-
Notifications
You must be signed in to change notification settings - Fork 125
/
xero-identity.yaml
158 lines (158 loc) · 5.2 KB
/
xero-identity.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
openapi: 3.0.0
info:
version: 6.3.0
title: Xero OAuth 2 Identity Service API
description: These endpoints are related to managing authentication tokens and identity for Xero API
termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
name: Xero Platform Team
email: [email protected]
url: https://developer.xero.com
license:
name: MIT
url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Identity service API
url: https://api.xero.com
paths:
/Connections:
get:
security:
- OAuth2: []
tags:
- identity
description: Override the base server url that include version
operationId: getConnections
summary: Retrieves the connections for this user
parameters:
- in: query
required: false
name: authEventId
description: Filter by authEventId
example: 00000000-0000-0000-0000-000000000000
schema:
type: string
format: uuid
x-basepath: https://api.xero.com
responses:
"200":
description: Success - return response of type Connections array with 0 to n Connection
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Connection'
example: '[ { "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44", "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58", "tenantName": "Demo Company (NZ)", "tenantType": "ORGANISATION", "createdDateUtc": "2019-12-07T18:46:19.5165400", "updatedDateUtc": "2019-12-07T18:46:19.5187840" } ]'
/Connections/{id}:
delete:
security:
- OAuth2: []
tags:
- identity
description: Override the base server url that include version
operationId: deleteConnection
summary: Deletes a connection for this user (i.e. disconnect a tenant)
x-basepath: https://api.xero.com
parameters:
- required: true
in: path
name: id
description: Unique identifier for retrieving single object
schema:
type: string
format: uuid
responses:
"204":
description: Success - connection has been deleted no content returned
"404":
description: Resource not found
components:
schemas:
Connection:
externalDocs:
url: http://developer.xero.com
properties:
id:
description: Xero identifier
type: string
format: uuid
tenantId:
description: Xero identifier of organisation
type: string
format: uuid
authEventId:
description: Identifier shared across connections authorised at the same time
type: string
format: uuid
tenantType:
description: Xero tenant type (i.e. ORGANISATION, PRACTICE)
type: string
tenantName:
description: Xero tenant name
type: string
createdDateUtc:
description: The date when the user connected this tenant to your app
type: string
format: date-time
x-is-datetime: true
x-php-format: \DateTime
updatedDateUtc:
description: The date when the user most recently connected this tenant to your app. May differ to the created date if the user has disconnected and subsequently reconnected this tenant to your app.
type: string
format: date-time
x-is-datetime: true
x-php-format: \DateTime
RefreshToken:
externalDocs:
url: http://developer.xero.com
type: object
properties:
grant_type:
description: Xero grant type
type: string
refresh_token:
description: refresh token provided during authentication flow
type: string
client_id:
description: client id for Xero app
type: string
client_secret:
description: client secret for Xero app 2
type: string
AccessToken:
externalDocs:
url: http://developer.xero.com
type: object
properties:
id_token:
description: Xero unique identifier
type: string
access_token:
description: access token provided during authentication flow
type: string
expires_in:
description: time in seconds until access token expires.
type: integer
format: int64
token_type:
description: type of token i.e. Bearer
type: string
refresh_token:
description: token used to refresh an expired access token
type: string
securitySchemes:
BasicAuth:
type: http
scheme: basic
OAuth2:
type: oauth2
description: For more information
flows:
authorizationCode:
authorizationUrl: https://login.xero.com/identity/connect/authorize
tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
profile: your profile information