openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 5.86 kB
JSON
{"openapi":"3.0.0","info":{"description":"The Box Token API provides methods to retrieve an access token and revoke an access token. An access token is a data string that enables Box to verify that a request belongs to an authorized session. In the normal order of operations you will being by requesting authentication from the Box.","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"},"title":"Box 2.0 OAuth2 Token","version":"2.0","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://twitter.com/BoxHQ/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/box/box-openapi/master/v2.0/token.openapi-v2.json","version":"2.0"}],"x-providerName":"box.com","x-serviceName":"token"},"paths":{"/revoke":{"post":{"description":"This is the URL of the Box revoke endpoint, the endpoint that revokes access tokens, or to put it another way, the endpoint that ends sessions, logging users out.","externalDocs":{"url":"https://docs.box.com/reference#revoke"},"operationId":"revokeToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"client_id":{"description":"The client ID of the application requesting authentication.","type":"string"},"client_secret":{"description":"The client secret of the application requesting authentication.","type":"string"}},"required":["token","client_id","client_secret"]}}}},"responses":{"200":{"description":"Revoken token is successful"},"default":{"description":"Revoke token error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"summary":"Revoke token","tags":["AccessToken"]}},"/token":{"post":{"description":"This is the URL of the Box token endpoint, the endpoint that returns access tokens. An access token is a data string that enables Box to verify that a request belongs to an authorized session.","externalDocs":{"url":"https://docs.box.com/reference#token"},"operationId":"generateAccessToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string"},"code":{"description":"The authorization code returned by Box in response to a successfull authentication request.","type":"string"},"client_id":{"description":"The client ID of the application requesting authentication.","type":"string"},"client_secret":{"description":"The client secret of the application requesting authentication.","type":"string"},"refresh_token":{"description":"The refresh_token that is used to get the new access_token","type":"string"},"subject_token":{"description":"This is the primary/secondary application token you will exchange for the file token.","type":"string"},"subject_token_type":{"description":"The subject token type is urn:ietf:params:oauth:token-type:access_token","type":"string"},"resource":{"description":"Full url path to the file that the token should be generated for example, https://api.box.com/2.0/files/{file_id}","type":"string"},"actor_token":{"description":"Full url path to the file that the token should be generated for example, https://api.box.com/2.0/files/{file_id}","type":"string"},"actor_token_type":{"description":"Full url path to the file that the token should be generated for example, https://api.box.com/2.0/files/{file_id}","type":"string","enum":["urn:ietf:params:oauth:token-type:id_token"]}},"required":["grant_type","client_id","client_secret"]}}}},"responses":{"200":{"description":"A new access token is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessToken"}}}},"default":{"description":"Access token generation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"summary":"Generate Access token","tags":["AccessToken"]}}},"servers":[{"url":"https://api.box.com/oauth2"}],"components":{"schemas":{"AccessToken":{"properties":{"access_token":{"type":"string"},"expires_in":{"format":"int64","type":"integer"},"issued_token_type":{"type":"string"},"refresh_token":{"type":"string"},"restricted_to":{"items":{"$ref":"#/components/schemas/RestrictedTo"},"type":"array"},"token_type":{"enum":["bearer"],"type":"string"}},"title":"Access token response","type":"object"},"FileReference":{"allOf":[{"$ref":"#/components/schemas/ItemReference"},{"properties":{"sha1":{"description":"The sha1 hash of this file.","type":"string"}}}],"description":"It references either a file or a folder","type":"object"},"ItemReference":{"allOf":[{"$ref":"#/components/schemas/Reference"},{"properties":{"etag":{"description":"A unique string identifying the version of this folder.\nMay be null for some folders such as root or trash.","type":"string"},"name":{"description":"The name of the folder.","type":"string"},"sequence_id":{"description":"A unique ID for use with the /events endpoint.\nMay be null for some folders such as root or trash.","type":"string"}}}],"description":"It references either a file or a folder","type":"object"},"OAuthError":{"properties":{"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"type":"object"},"Reference":{"properties":{"id":{"type":"string"},"type":{"enum":["folder","file","user","file_version","lock","collaboration","comment","task","web_link","collection","task_assignment","event","realtime_server","webhook_event","webhook","enterprise","invite","email_alias","group","group_membership","device_pinner","retention_policy","retention_policy_assignment","file_version_retention","legal_hold_policy","legal_hold_policy_assignment","legal_hold","upload_session"],"type":"string"}},"type":"object"},"RestrictedTo":{"properties":{"object":{"$ref":"#/components/schemas/FileReference"},"scope":{"type":"string"}},"type":"object"}}}}