| # Copyright 2017 Google Inc. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| host: playground.apistudio.io |
| swagger: "2.0" |
| info: |
| version: "0.0.1" |
| title: Swagger API |
| basePath: /try/35cd6835-f2ed-4582-a1ae-d10ed29d062b |
| schemes: |
| - http |
| - https |
| consumes: |
| - application/json |
| produces: |
| - application/json |
| paths: |
| /apikey: |
| post: |
| tags: |
| - VerifyApiKey |
| summary: Validates the consumer key and returns the attributes associated with apikey,developer,app and apiproduct. Http method is POST but it doesnt mutates any data. POST is used for sending content in the http request. |
| description: 'Verify api key ' |
| produces: |
| - application/json |
| consumes: |
| - application/json |
| parameters: |
| - name: Authorization |
| description: credentials to authenticate with apid |
| in: header |
| required: true |
| type: string |
| - name: gateway |
| in: header |
| type: string |
| - name: _ |
| in: body |
| required: true |
| schema: |
| $ref: '#/definitions/VerifyAPIKeyRequest' |
| responses: |
| '200': |
| description: Success. ApiKey was verified successfully. |
| schema: |
| $ref: '#/definitions/VerifyApiKeySuccessResponse' |
| '401': |
| description: Either clientId,app or developer or company is not valid or status is not approved or entity is not found |
| schema: |
| $ref: '#/definitions/ErrorResponse' |
| '403': |
| description: ClientId is not authorized to access the resourceUri,environment or proxy. |
| schema: |
| $ref: '#/definitions/ErrorResponse' |
| default: |
| description: Unexpected error. |
| schema: |
| $ref: '#/definitions/ErrorResponse' |
| |
| definitions: |
| VerifyAPIKeyRequest: |
| type: object |
| required: |
| - action |
| - key |
| - uriPath |
| - organizationName |
| - environmentName |
| - apiProxyName |
| properties: |
| action: |
| type: string |
| key: |
| type: string |
| uriPath: |
| type: string |
| organizationName: |
| type: string |
| environmentName: |
| type: string |
| apiProxyName: |
| type: string |
| validateAgainstApiProxiesAndEnvs: |
| type: boolean |
| description: when this flag is false, authentication of key and authorization for uripath is done and authorization for apiproxies and environments is skipped. Default is true. |
| VerifyApiKeySuccessResponse: |
| type: object |
| description: 'Response object for the verification of apikey. Verification of apikey response contains details such as developer-id,developer-email-id, other fields and attributes ; app-id,app-name, other fields and attributes; apiproduct-name, fields and attributes ; ' |
| properties: |
| self: |
| type: string |
| organization: |
| description: Organization Identifier/Name |
| type: string |
| environment: |
| description: Environment Identifier/Name |
| type: string |
| clientId: |
| description: fields and attributes related to clientId |
| type: object |
| $ref: '#/definitions/ClientIdDetails' |
| developer: |
| description: fields and attributes related to developer |
| type: object |
| $ref: '#/definitions/DeveloperDetails' |
| company: |
| description: fields and attributes related to company |
| type: object |
| $ref: '#/definitions/CompanyDetails' |
| app: |
| description: fields and attributes related to app |
| type: object |
| $ref: '#/definitions/AppDetails' |
| apiProduct: |
| description: fields and attributes related to apiProduct |
| type: object |
| $ref: '#/definitions/ApiProductDetails' |
| |
| identifier: |
| description: Identifier of the authorization code. This will be unique for each request. |
| type: string |
| kind: |
| type: string |
| ErrorResponse: |
| type: object |
| description: Error response returned |
| properties: |
| response_code: |
| type: string |
| response_message: |
| type: string |
| kind: |
| type: string |
| Attribute: |
| type: object |
| description: Attribute details |
| properties: |
| Name: |
| type: string |
| Value: |
| type: string |
| kind: |
| type: string |
| ClientIdDetails: |
| type: object |
| description: Fields related to consumer key |
| properties: |
| clientId: |
| type: string |
| clientSecret: |
| type: string |
| redirectURIs: |
| type: array |
| items: |
| type: string |
| status: |
| type: string |
| attributes: |
| description: Attributes associated with the client Id. |
| type: array |
| items: |
| $ref: '#/definitions/Attribute' |
| DeveloperDetails: |
| type: object |
| description: Fields related to developer |
| properties: |
| id: |
| type: string |
| userName: |
| type: string |
| firstName: |
| type: string |
| lastName: |
| type: string |
| email: |
| type: string |
| status: |
| type: string |
| apps: |
| type: array |
| items: |
| type: string |
| created_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| created_by: |
| type: string |
| lastmodified_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| lastmodified_by: |
| type: string |
| company: |
| type: string |
| attributes: |
| description: Attributes associated with the developer. |
| type: array |
| items: |
| $ref: '#/definitions/Attribute' |
| CompanyDetails: |
| type: object |
| description: Fields related to company |
| properties: |
| id: |
| type: string |
| name: |
| type: string |
| displayName: |
| type: string |
| status: |
| type: string |
| apps: |
| type: array |
| items: |
| type: string |
| created_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| created_by: |
| type: string |
| lastmodified_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| lastmodified_by: |
| type: string |
| attributes: |
| description: Attributes associated with the company. |
| type: array |
| items: |
| $ref: '#/definitions/Attribute' |
| AppDetails: |
| type: object |
| description: Fields related to app |
| properties: |
| id: |
| type: string |
| name: |
| type: string |
| accessType: |
| type: string |
| callbackUrl: |
| type: string |
| displayName: |
| type: string |
| status: |
| type: string |
| apiproducts: |
| type: array |
| items: |
| type: string |
| appFamily: |
| type: string |
| created_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| created_by: |
| type: string |
| lastmodified_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| lastmodified_by: |
| type: string |
| company: |
| type: string |
| attributes: |
| description: Attributes associated with the app. |
| type: array |
| items: |
| $ref: '#/definitions/Attribute' |
| ApiProductDetails: |
| type: object |
| description: Fields related to app |
| properties: |
| id: |
| type: string |
| name: |
| type: string |
| displayName: |
| type: string |
| quota.limit: |
| type: integer |
| format: int64 |
| quota.interval: |
| type: integer |
| format: int64 |
| quota.timeunit: |
| type: integer |
| format: int64 |
| status: |
| type: string |
| created_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| created_by: |
| type: string |
| lastmodified_at: |
| type: string |
| format: date-time |
| description: "ISO-8601 timestamp" |
| lastmodified_by: |
| type: string |
| company: |
| type: string |
| environments: |
| type: array |
| items: |
| type: string |
| apiproxies: |
| type: array |
| items: |
| type: string |
| attributes: |
| description: Attributes associated with the apiproduct. |
| type: array |
| items: |
| $ref: '#/definitions/Attribute' |
| |
| |
| |