@portpowered/reference-data 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/generated/openapi.json +375 -25
  2. package/generated/public/docs/for-ai/operations/addEndpointGroupMembers.md +2 -0
  3. package/generated/public/docs/for-ai/operations/authorizeDevice.md +16 -0
  4. package/generated/public/docs/for-ai/operations/completeOAuthConsent.md +5 -0
  5. package/generated/public/docs/for-ai/operations/createFlowNode.md +2 -0
  6. package/generated/public/docs/for-ai/operations/createOAuthClient.md +5 -0
  7. package/generated/public/docs/for-ai/operations/createToken.md +4 -0
  8. package/generated/public/docs/for-ai/operations/createView.md +6 -0
  9. package/generated/public/docs/for-ai/operations/deleteEndpoint.md +1 -1
  10. package/generated/public/docs/for-ai/operations/deleteFlowNode.md +2 -0
  11. package/generated/public/docs/for-ai/operations/deleteRoute.md +1 -1
  12. package/generated/public/docs/for-ai/operations/deviceAuthorize.md +21 -6
  13. package/generated/public/docs/for-ai/operations/enumerateEndpoints.md +14 -4
  14. package/generated/public/docs/for-ai/operations/establishAuthLink.md +2 -0
  15. package/generated/public/docs/for-ai/operations/establishPlugin.md +5 -0
  16. package/generated/public/docs/for-ai/operations/evaluateAccessControlRule.md +2 -0
  17. package/generated/public/docs/for-ai/operations/generateOAuthCode.md +6 -0
  18. package/generated/public/docs/for-ai/operations/generateToken.md +1 -1
  19. package/generated/public/docs/for-ai/operations/generateTuyaQrCode.md +3 -0
  20. package/generated/public/docs/for-ai/operations/getAccessControlRules.md +2 -0
  21. package/generated/public/docs/for-ai/operations/getEndpointGroup.md +8 -0
  22. package/generated/public/docs/for-ai/operations/getOAuthAuthorizationServerMetadata.md +19 -1
  23. package/generated/public/docs/for-ai/operations/getOAuthClient.md +3 -0
  24. package/generated/public/docs/for-ai/operations/getOpenIDConfiguration.md +12 -1
  25. package/generated/public/docs/for-ai/operations/getPendingOAuthConsent.md +6 -0
  26. package/generated/public/docs/for-ai/operations/getView.md +2 -0
  27. package/generated/public/docs/for-ai/operations/handleGoogleCloudSchedulerWebhook.md +3 -0
  28. package/generated/public/docs/for-ai/operations/handleOAuthCallback.md +7 -0
  29. package/generated/public/docs/for-ai/operations/index.md +1 -1
  30. package/generated/public/docs/for-ai/operations/invalidateToken.md +2 -0
  31. package/generated/public/docs/for-ai/operations/pluginAuthCodeExchange.md +4 -0
  32. package/generated/public/docs/for-ai/operations/pluginAuthMultifactorExchange.md +4 -0
  33. package/generated/public/docs/for-ai/operations/pushToMessageGateway.md +2 -0
  34. package/generated/public/docs/for-ai/operations/raiseAnonymousPrincipal.md +17 -0
  35. package/generated/public/docs/for-ai/operations/refreshAuthLinkToken.md +2 -0
  36. package/generated/public/docs/for-ai/operations/registerDynamicOAuthClient.md +9 -0
  37. package/generated/public/docs/for-ai/operations/removeEndpointGroupMembers.md +2 -0
  38. package/generated/public/docs/for-ai/operations/revokeOAuthGrant.md +3 -0
  39. package/generated/public/docs/for-ai/operations/setEndpointGroupName.md +4 -0
  40. package/generated/public/docs/for-ai/operations/synchronizeRoutes.md +2 -0
  41. package/generated/public/docs/for-ai/operations/updateOAuthClient.md +2 -0
  42. package/generated/public/docs/for-ai/operations/updateView.md +6 -0
  43. package/generated/public/docs/for-ai/operations/upsertAccessControlRule.md +5 -0
  44. package/generated/public/docs/for-ai/operations/upsertAuthLink.md +6 -0
  45. package/generated/public/docs/for-ai/operations/upsertEndpoint.md +6 -0
  46. package/generated/public/docs/for-ai/operations/upsertPluginRequest.md +2 -0
  47. package/generated/public/docs/for-ai/operations/upsertPrincipal.md +2 -0
  48. package/generated/public/docs/for-ai/operations/upsertRoute.md +4 -0
  49. package/generated/public/docs/for-ai/operations/upsertSecret.md +6 -0
  50. package/generated/public/docs/for-ai/operations/upsertSimulator.md +4 -0
  51. package/generated/public/docs/for-ai/operations/validateOAuthRequest.md +6 -0
  52. package/generated/public/docs/for-ai/operations/validateTuyaLoginCode.md +4 -0
  53. package/generated/public/docs/for-ai/operations/verifyDevice.md +11 -0
  54. package/generated/public/docs/references/authorization.json +2 -2
  55. package/generated/public/docs/references/authorization.yaml +2 -2
  56. package/generated/public/docs/references/manifest.json +108 -108
  57. package/generated/public/docs/references/openapi.yaml +282 -23
  58. package/package.json +1 -1
@@ -69,6 +69,8 @@ post:
69
69
  application/json:
70
70
  schema:
71
71
  $ref: '#/components/schemas/AddEndpointGroupMembersRequest'
72
+ example:
73
+ memberEndpointIds: []
72
74
  responses:
73
75
  '202':
74
76
  description: Members addition accepted
@@ -52,6 +52,11 @@ post:
52
52
  application/json:
53
53
  schema:
54
54
  $ref: '#/components/schemas/AuthorizeDeviceRequest'
55
+ example:
56
+ user_code: ABCD-EFGH
57
+ scopes:
58
+ - endpoint:read
59
+ - endpoint:write
55
60
  responses:
56
61
  '200':
57
62
  description: Device authorization successful
@@ -59,24 +64,35 @@ post:
59
64
  application/json:
60
65
  schema:
61
66
  $ref: '#/components/schemas/AuthorizeDeviceResponse'
67
+ example:
68
+ success: true
62
69
  '400':
63
70
  description: Invalid request (e.g., missing user_code, invalid user_code, or invalid scopes)
64
71
  content:
65
72
  application/json:
66
73
  schema:
67
74
  $ref: '#/components/schemas/OAuthErrorResponse'
75
+ example:
76
+ error: invalid_request
77
+ error_description: user_code is required
68
78
  '401':
69
79
  description: Unauthorized (missing or invalid authentication token)
70
80
  content:
71
81
  application/json:
72
82
  schema:
73
83
  $ref: '#/components/schemas/OAuthErrorResponse'
84
+ example:
85
+ error: invalid_request
86
+ error_description: user_code is required
74
87
  '500':
75
88
  description: Internal server error
76
89
  content:
77
90
  application/json:
78
91
  schema:
79
92
  $ref: '#/components/schemas/OAuthErrorResponse'
93
+ example:
94
+ error: invalid_request
95
+ error_description: user_code is required
80
96
  x-portos-delegated: false
81
97
  x-portos-resource-permission: false
82
98
  security:
@@ -56,6 +56,9 @@ post:
56
56
  type: boolean
57
57
  scope:
58
58
  type: string
59
+ example:
60
+ request_id: SERVER_ISSUED_PENDING_REQUEST_ID
61
+ approved: true
59
62
  responses:
60
63
  '200':
61
64
  description: Callback navigation URL containing code or denial and original state.
@@ -69,6 +72,8 @@ post:
69
72
  redirect_url:
70
73
  type: string
71
74
  format: uri
75
+ example:
76
+ redirect_url: http://127.0.0.1:8765/callback?code=SERVER_ISSUED_CODE&state=ORIGINAL_STATE
72
77
  '400':
73
78
  description: Invalid, expired or consumed request.
74
79
  '401':
@@ -58,6 +58,8 @@ post:
58
58
  application/json:
59
59
  schema:
60
60
  $ref: '#/components/schemas/FlowNode'
61
+ example:
62
+ id: port1/principals/example
61
63
  '400':
62
64
  description: Bad request — invalid request payload or validation failure.
63
65
  content:
@@ -52,6 +52,8 @@ post:
52
52
  application/json:
53
53
  schema:
54
54
  $ref: '#/components/schemas/OAuthClientRegistrationRequest'
55
+ example:
56
+ clientName: port1/principals/example
55
57
  responses:
56
58
  '200':
57
59
  description: OAuth client created successfully
@@ -59,6 +61,9 @@ post:
59
61
  application/json:
60
62
  schema:
61
63
  $ref: '#/components/schemas/CreateOAuthClientResponse'
64
+ example:
65
+ clientId: port1/principals/example
66
+ clientSecret: port1/principals/example
62
67
  '400':
63
68
  description: Invalid request payload
64
69
  '401':
@@ -58,6 +58,10 @@ post:
58
58
  application/json:
59
59
  schema:
60
60
  $ref: '#/components/schemas/CreateTokenResponse'
61
+ example:
62
+ id: port1/principals/example
63
+ token: port1/principals/example
64
+ expires_at: '2026-10-08T12:00:00Z'
61
65
  '400':
62
66
  description: Invalid request (e.g. invalid subject, malformed body)
63
67
  '401':
@@ -44,6 +44,12 @@ post:
44
44
  application/json:
45
45
  schema:
46
46
  $ref: '#/components/schemas/UpsertViewRequest'
47
+ example:
48
+ title:
49
+ type: LIGHT
50
+ value: port1/principals/example
51
+ positions: []
52
+ widgets: []
47
53
  responses:
48
54
  '201':
49
55
  description: View created successfully
@@ -37,7 +37,7 @@ delete:
37
37
  schema:
38
38
  $ref: '#/components/schemas/DeleteEndpointRequest'
39
39
  example:
40
- id: port1/principals/user123/resources/abc-123
40
+ id: port1/principals/example/endpoints/light-1
41
41
  responses:
42
42
  '200':
43
43
  description: Endpoint deleted successfully
@@ -52,6 +52,8 @@ delete:
52
52
  id:
53
53
  type: string
54
54
  description: The ID of the flow node to delete.
55
+ example:
56
+ id: port1/principals/example
55
57
  responses:
56
58
  '200':
57
59
  description: Flow node deleted successfully.
@@ -37,7 +37,7 @@ delete:
37
37
  schema:
38
38
  $ref: '#/components/schemas/DeleteRouteRequest'
39
39
  example:
40
- id: port1/principals/user123/resources/abc-123
40
+ id: port1/principals/example/routes/light-route
41
41
  responses:
42
42
  '200':
43
43
  description: Route deleted successfully
@@ -1,6 +1,6 @@
1
1
  # deviceAuthorize
2
2
 
3
- POST `/auth/device_authorization`
3
+ POST `/auth/device-authorization`
4
4
 
5
5
  OAuth2 Device Authorization
6
6
 
@@ -9,13 +9,13 @@ This API is used by your device to obtain authorization from the resource owner
9
9
  See the [OAuth device authorization docs for more](https://datatracker.ietf.org/doc/html/rfc8628).
10
10
 
11
11
 
12
- Uses the existing managed-client device flow. This endpoint is public, but validates its client and supported device grant; anonymous DCR clients support authorization_code and optional refresh_token, and cannot start the device flow.
12
+ Uses the existing managed-client device flow. This endpoint is public, but validates its client and supported device grant; anonymous DCR clients support authorization_code and optional refresh_token, and cannot start the device flow. The legacy /auth/device_authorization path remains a compatibility alias.
13
13
 
14
14
  ## Authorization
15
15
 
16
16
  ```yaml
17
- path: /auth/device_authorization
18
- runtimePath: /auth/device_authorization
17
+ path: /auth/device-authorization
18
+ runtimePath: /auth/device-authorization
19
19
  method: POST
20
20
  operationId: deviceAuthorize
21
21
  security:
@@ -27,7 +27,7 @@ resourcePermissionRequired: false
27
27
  ## Complete operation contract
28
28
 
29
29
  ```yaml
30
- path: /auth/device_authorization
30
+ path: /auth/device-authorization
31
31
  post:
32
32
  tags:
33
33
  - Auth
@@ -44,7 +44,8 @@ post:
44
44
 
45
45
  Uses the existing managed-client device flow. This endpoint is public, but validates its client
46
46
  and supported device grant; anonymous DCR clients support authorization_code and optional
47
- refresh_token, and cannot start the device flow.
47
+ refresh_token, and cannot start the device flow. The legacy /auth/device_authorization path
48
+ remains a compatibility alias.
48
49
  operationId: deviceAuthorize
49
50
  security:
50
51
  - {}
@@ -54,6 +55,8 @@ post:
54
55
  application/x-www-form-urlencoded:
55
56
  schema:
56
57
  $ref: '#/components/schemas/DeviceAuthorizationRequest'
58
+ example:
59
+ client_id: dcr_example
57
60
  responses:
58
61
  '200':
59
62
  description: Device authorization initiated successfully
@@ -61,18 +64,30 @@ post:
61
64
  application/json:
62
65
  schema:
63
66
  $ref: '#/components/schemas/DeviceAuthorizationResponse'
67
+ example:
68
+ device_code: port1/principals/example
69
+ user_code: port1/principals/example
70
+ verification_uri: https://portpowered.com/oauth/device/verify
71
+ expires_in: 1800
72
+ interval: 5
64
73
  '400':
65
74
  description: Invalid request parameters
66
75
  content:
67
76
  application/json:
68
77
  schema:
69
78
  $ref: '#/components/schemas/OAuthErrorResponse'
79
+ example:
80
+ error: invalid_request
81
+ error_description: user_code is required
70
82
  '500':
71
83
  description: Internal server error
72
84
  content:
73
85
  application/json:
74
86
  schema:
75
87
  $ref: '#/components/schemas/OAuthErrorResponse'
88
+ example:
89
+ error: invalid_request
90
+ error_description: user_code is required
76
91
  x-portos-delegated: false
77
92
  x-portos-resource-permission: false
78
93
  ```
@@ -58,7 +58,7 @@ get:
58
58
  check-token:
59
59
  value: ~caller
60
60
  check-id:
61
- value: port1/user/alice/user/alice
61
+ value: port1/principals/example
62
62
  - name: id
63
63
  in: query
64
64
  description: The unique identifier of a specific endpoint to retrieve
@@ -67,7 +67,7 @@ get:
67
67
  type: string
68
68
  examples:
69
69
  endpoint-id:
70
- value: port1/user/alice/endpoints/abc-123
70
+ value: port1/principals/example/endpoints/light-1
71
71
  - name: type
72
72
  in: query
73
73
  description: Filter endpoints by their primary type
@@ -76,7 +76,7 @@ get:
76
76
  type: string
77
77
  examples:
78
78
  type-filter:
79
- value: light
79
+ value: LIGHT
80
80
  - name: serialNumber
81
81
  in: query
82
82
  description: Filter endpoints by their serial number
@@ -94,7 +94,7 @@ get:
94
94
  type: string
95
95
  examples:
96
96
  next-token:
97
- value: '123'
97
+ value: OPAQUE_TOKEN_FROM_PREVIOUS_RESPONSE
98
98
  - name: maxResults
99
99
  in: query
100
100
  description: The maximum number of results to return
@@ -145,6 +145,16 @@ get:
145
145
  schema:
146
146
  $ref: '#/components/schemas/EndpointQueryResponse'
147
147
  examples: {}
148
+ example:
149
+ results:
150
+ - id: port1/principals/example/endpoints/light-1
151
+ name:
152
+ type: PLAIN
153
+ value: Office light
154
+ type: LIGHT
155
+ interfaces: []
156
+ ownerId: port1/principals/example
157
+ enablement: ENABLED
148
158
  '400':
149
159
  description: Bad request - missing required parameters
150
160
  content:
@@ -48,6 +48,8 @@ post:
48
48
  application/json:
49
49
  schema:
50
50
  $ref: '#/components/schemas/EstablishAuthLinkRequest'
51
+ example:
52
+ pluginId: port1/principals/example
51
53
  responses:
52
54
  '200':
53
55
  description: Auth link established successfully
@@ -49,6 +49,9 @@ post:
49
49
  application/json:
50
50
  schema:
51
51
  $ref: '#/components/schemas/EstablishPluginRequest'
52
+ example:
53
+ plugin:
54
+ type: LIGHT
52
55
  responses:
53
56
  '200':
54
57
  description: Plugin established successfully
@@ -56,6 +59,8 @@ post:
56
59
  application/json:
57
60
  schema:
58
61
  $ref: '#/components/schemas/EstablishPluginResponse'
62
+ example:
63
+ pluginId: port1/principals/example
59
64
  '400':
60
65
  description: Invalid request payload
61
66
  content:
@@ -44,6 +44,8 @@ post:
44
44
  application/json:
45
45
  schema:
46
46
  $ref: '#/components/schemas/EvaluateAccessControlRuleRequest'
47
+ example:
48
+ requests: port1/principals/example
47
49
  responses:
48
50
  '200':
49
51
  description: Access control rule evaluated successfully
@@ -51,6 +51,9 @@ post:
51
51
  application/json:
52
52
  schema:
53
53
  $ref: '#/components/schemas/GenerateOAuthCodeRequest'
54
+ example:
55
+ client_id: port1/principals/user123/oauth-clients/my-client
56
+ redirect_uri: https://myapp.com/callback
54
57
  responses:
55
58
  '200':
56
59
  description: Authorization code generated successfully
@@ -58,6 +61,9 @@ post:
58
61
  application/json:
59
62
  schema:
60
63
  $ref: '#/components/schemas/GenerateOAuthCodeResponse'
64
+ example:
65
+ code: abc123def456ghi789
66
+ expiryInSeconds: 600
61
67
  '400':
62
68
  description: Invalid request (e.g., invalid client_id, redirect_uri, or scopes)
63
69
  '401':
@@ -52,7 +52,7 @@ post:
52
52
  redirect_uri: http://127.0.0.1:8765/callback
53
53
  code: CALLBACK_CODE
54
54
  code_verifier: ORIGINAL_RANDOM_PKCE_VERIFIER
55
- resource: https://api.portpowered.com
55
+ resource: https://portos-pilot-api-685761720421.us-west1.run.app
56
56
  responses:
57
57
  '200':
58
58
  description: Token generated successfully
@@ -57,6 +57,9 @@ post:
57
57
  description: >
58
58
  Optional override for the Tuya authentication API endpoint. Defaults to
59
59
  https://apigw.iotbing.com if not provided.
60
+ example:
61
+ accessCode: port1/principals/example
62
+ clientId: port1/principals/example
60
63
  responses:
61
64
  '200':
62
65
  description: QR code generated successfully
@@ -89,6 +89,8 @@ get:
89
89
  application/json:
90
90
  schema:
91
91
  $ref: '#/components/schemas/GetAccessControlRulesResponse'
92
+ example:
93
+ results: []
92
94
  '500':
93
95
  description: Internal server error
94
96
  content:
@@ -104,6 +104,14 @@ get:
104
104
  application/json:
105
105
  schema:
106
106
  $ref: '#/components/schemas/EndpointGroup'
107
+ example:
108
+ id: port1/principals/example/endpoint-groups/living-room
109
+ name:
110
+ type: LIGHT
111
+ value: port1/principals/example
112
+ ownerId: port1/principals/example
113
+ interfaces: []
114
+ etag: '"12"'
107
115
  '400':
108
116
  description: Invalid request payload
109
117
  content:
@@ -45,7 +45,6 @@ get:
45
45
  - issuer
46
46
  - authorization_endpoint
47
47
  - token_endpoint
48
- - registration_endpoint
49
48
  - revocation_endpoint
50
49
  - scopes_supported
51
50
  properties:
@@ -61,6 +60,7 @@ get:
61
60
  registration_endpoint:
62
61
  type: string
63
62
  format: uri
63
+ description: Advertised when new anonymous registration is enabled; omitted when disabled.
64
64
  revocation_endpoint:
65
65
  type: string
66
66
  format: uri
@@ -85,6 +85,24 @@ get:
85
85
  type: boolean
86
86
  authorization_response_iss_parameter_supported:
87
87
  type: boolean
88
+ example:
89
+ issuer: https://portos-pilot-api-685761720421.us-west1.run.app
90
+ authorization_endpoint: https://portos-pilot-api-685761720421.us-west1.run.app/oauth/authorize
91
+ token_endpoint: https://portos-pilot-api-685761720421.us-west1.run.app/auth/token
92
+ revocation_endpoint: https://portos-pilot-api-685761720421.us-west1.run.app/auth/revoke
93
+ scopes_supported:
94
+ - endpoint:read
95
+ - message:send
96
+ registration_endpoint: https://portos-pilot-api-685761720421.us-west1.run.app/oauth/register
97
+ jwks_uri: https://portos-pilot-api-685761720421.us-west1.run.app/.well-known/jwks.json
98
+ code_challenge_methods_supported:
99
+ - S256
100
+ token_endpoint_auth_methods_supported:
101
+ - none
102
+ - client_secret_post
103
+ - client_secret_basic
104
+ client_id_metadata_document_supported: true
105
+ authorization_response_iss_parameter_supported: true
88
106
  ```
89
107
 
90
108
  Resolve component references against [OpenAPI](/docs/references/openapi.yaml). [Auth guide](/docs/for-ai/guides/authentication-and-dcr.md).
@@ -76,6 +76,9 @@ get:
76
76
  application/json:
77
77
  schema:
78
78
  $ref: '#/components/schemas/OAuthClient'
79
+ example:
80
+ clientId: port1/systems/zero/oauth-clients/1234567890
81
+ clientName: port1/principals/example
79
82
  '400':
80
83
  description: Invalid request payload
81
84
  content:
@@ -81,7 +81,18 @@ get:
81
81
  - urn:ietf:params:oauth:grant-type:token-exchange
82
82
  - urn:ietf:params:oauth:grant-type:device_code
83
83
  example:
84
- key: value
84
+ issuer: https://portos-pilot-api-685761720421.us-west1.run.app
85
+ jwks_uri: https://portos-pilot-api-685761720421.us-west1.run.app/.well-known/jwks.json
86
+ token_endpoint: https://portos-pilot-api-685761720421.us-west1.run.app/auth/token
87
+ response_types_supported:
88
+ - code
89
+ subject_types_supported:
90
+ - public
91
+ id_token_signing_alg_values_supported:
92
+ - RS256
93
+ grant_types_supported:
94
+ - authorization_code
95
+ - refresh_token
85
96
  x-portos-delegated: false
86
97
  x-portos-resource-permission: false
87
98
  ```
@@ -73,6 +73,12 @@ get:
73
73
  type: array
74
74
  items:
75
75
  type: string
76
+ example:
77
+ client_id: dcr_example
78
+ client_name: Example agent
79
+ redirect_uri: http://127.0.0.1:8765/callback
80
+ resource: https://portos-pilot-api-685761720421.us-west1.run.app
81
+ scopes: []
76
82
  '400':
77
83
  description: Invalid, expired or consumed request.
78
84
  '401':
@@ -84,6 +84,8 @@ get:
84
84
  application/json:
85
85
  schema:
86
86
  $ref: '#/components/schemas/View'
87
+ example:
88
+ id: port1/principals/example
87
89
  '400':
88
90
  description: Invalid request payload
89
91
  content:
@@ -70,6 +70,9 @@ post:
70
70
  node_id:
71
71
  type: string
72
72
  description: The Port OS identifier of the flow node to execute
73
+ example:
74
+ flow_id: port1/principals/example
75
+ node_id: port1/principals/example
73
76
  responses:
74
77
  '200':
75
78
  description: Webhook received and flow run triggered (always returned to prevent retries)
@@ -62,12 +62,19 @@ post:
62
62
  application/json:
63
63
  schema:
64
64
  $ref: '#/components/schemas/GenerateTokenResponse'
65
+ example:
66
+ access_token: port1/principals/example
67
+ token_type: port1/principals/example
68
+ expires_in: 1
65
69
  '400':
66
70
  description: Invalid callback data or provider error
67
71
  content:
68
72
  application/json:
69
73
  schema:
70
74
  $ref: '#/components/schemas/OAuthErrorResponse'
75
+ example:
76
+ error: invalid_request
77
+ error_description: user_code is required
71
78
  x-portos-delegated: false
72
79
  x-portos-resource-permission: false
73
80
  ```
@@ -68,7 +68,7 @@ Use the operation’s scopes and its resource permission requirements. Public di
68
68
  - [DELETE /{namespace}/{principalType}/{principalId}/tokens/{tokenId}](/docs/for-ai/operations/invalidateToken.md)
69
69
  - [POST /auth/raise](/docs/for-ai/operations/raiseAnonymousPrincipal.md)
70
70
  - [POST /auth/callback](/docs/for-ai/operations/handleOAuthCallback.md)
71
- - [POST /auth/device_authorization](/docs/for-ai/operations/deviceAuthorize.md)
71
+ - [POST /auth/device-authorization](/docs/for-ai/operations/deviceAuthorize.md)
72
72
  - [GET /oauth-clients](/docs/for-ai/operations/enumerateOAuthClients.md)
73
73
  - [POST /oauth-clients](/docs/for-ai/operations/createOAuthClient.md)
74
74
  - [GET /port1/{principalType}/{principalId}/oauth-clients/{clientId}](/docs/for-ai/operations/getOAuthClient.md)
@@ -73,6 +73,8 @@ delete:
73
73
  application/json:
74
74
  schema:
75
75
  $ref: '#/components/schemas/InvalidateTokenResponse'
76
+ example:
77
+ message: The request could not be completed. Check the supplied parameters and try again.
76
78
  '401':
77
79
  description: Unauthorized
78
80
  '403':
@@ -43,6 +43,10 @@ post:
43
43
  application/json:
44
44
  schema:
45
45
  $ref: '#/components/schemas/PluginAuthCodeExchangeRequest'
46
+ example:
47
+ pluginId: port1/principals/example
48
+ principalId: port1/principals/example
49
+ pluginAuthenticationData: {}
46
50
  responses:
47
51
  '202':
48
52
  description: Plugin auth code exchange started successfully, the operation is ongoing in the background.
@@ -44,6 +44,10 @@ post:
44
44
  application/json:
45
45
  schema:
46
46
  $ref: '#/components/schemas/PluginAuthMultifactorExchangeRequest'
47
+ example:
48
+ pluginId: port1/principals/example
49
+ principalId: port1/principals/example
50
+ pluginAuthenticationData: {}
47
51
  responses:
48
52
  '202':
49
53
  description: Auth link setup started successfully, the operation is ongoing in the background.
@@ -42,6 +42,8 @@ post:
42
42
  application/json:
43
43
  schema:
44
44
  $ref: '#/components/schemas/Message'
45
+ example:
46
+ body: {}
45
47
  responses:
46
48
  '202':
47
49
  description: Message accepted for processing
@@ -55,6 +55,10 @@ post:
55
55
  type: string
56
56
  description: |
57
57
  Token type identifier. Must be urn:ietf:params:oauth:token-type:id_token
58
+ example:
59
+ anonymous_refresh_token: port1/principals/example
60
+ subject_token: port1/principals/example
61
+ subject_token_type: port1/principals/example
58
62
  responses:
59
63
  '200':
60
64
  description: Principal raised successfully
@@ -62,24 +66,37 @@ post:
62
66
  application/json:
63
67
  schema:
64
68
  $ref: '#/components/schemas/GenerateTokenResponse'
69
+ example:
70
+ access_token: port1/principals/example
71
+ token_type: port1/principals/example
72
+ expires_in: 1
65
73
  '400':
66
74
  description: Invalid request (malformed form data or invalid parameters)
67
75
  content:
68
76
  application/json:
69
77
  schema:
70
78
  $ref: '#/components/schemas/OAuthErrorResponse'
79
+ example:
80
+ error: invalid_request
81
+ error_description: user_code is required
71
82
  '401':
72
83
  description: Invalid grant (anonymous refresh token is not valid)
73
84
  content:
74
85
  application/json:
75
86
  schema:
76
87
  $ref: '#/components/schemas/OAuthErrorResponse'
88
+ example:
89
+ error: invalid_request
90
+ error_description: user_code is required
77
91
  '500':
78
92
  description: Internal server error
79
93
  content:
80
94
  application/json:
81
95
  schema:
82
96
  $ref: '#/components/schemas/OAuthErrorResponse'
97
+ example:
98
+ error: invalid_request
99
+ error_description: user_code is required
83
100
  x-portos-delegated: false
84
101
  x-portos-resource-permission: false
85
102
  ```
@@ -54,6 +54,8 @@ post:
54
54
  authLinkId:
55
55
  type: string
56
56
  description: The ID of the auth link to refresh tokens for
57
+ example:
58
+ authLinkId: port1/principals/example
57
59
  responses:
58
60
  '200':
59
61
  description: Token refreshed successfully