"url" : "/api/v1/connectors/{id}",
"code" : 404
}
+ '/connectors/{id}/services':
+ get:
+ tags:
+ - connectors
+ - services
+ summary: Returns all the services related to the connector {id}
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - name : id
+ in: path
+ description: The id of the connector
+ required: true
+ type: integer
+ responses:
+ 200:
+ description: Successful operation
+ schema:
+ type: object
+ properties:
+ services:
+ type: array
+ items:
+ $ref: '#/definitions/Service'
+ pagination:
+ $ref: '#/definitions/Pagination'
+ examples:
+ application/json: |-
+ {
+ "services" : [
+ {
+ "id" : 4,
+ "name" : "signature",
+ "connector_id" : 2
+ }
+ ],
+ "pagination" :
+ {
+ "page_count" : 1,
+ "current_page" : 1,
+ "has_next_page" : false,
+ "has_prev_page": false,
+ "count": 1,
+ "limit": null
+ }
+ }
+ 404:
+ description: Connector not found
+ schema:
+ $ref: '#/definitions/SimpleError'
+ examples:
+ application/json: |-
+ {
+ "message" : "The connector with the id {id} does not exist",
+ "url" : "/api/v1/connectors/{id}/services",
+ "code" : 404
+ }
+ post:
+ tags:
+ - connectors
+ - services
+ summary: Creates a service
+ description: This can only be done by the logged in user.
+ consumes:
+ - application/json
+ - x-www-form-urlencoded
+ - application/xml
+ produces:
+ - application/xml
+ - application/json
+ parameters:
+ - name : id
+ in: path
+ description: The id of the connector
+ required: true
+ type: integer
+ - name: name
+ in: formData
+ description: The name of the service
+ required: true
+ type: string
+ responses:
+ '201':
+ description: Successful operation
+ schema:
+ $ref: '#/definitions/Service'
+ examples:
+ application/json: |-
+ {
+ "id" : 1,
+ "name" : "actes",
+ "connector_id" : 1
+ }
+ '400':
+ description: Validation error
+ schema:
+ $ref: '#/definitions/ValidationError'
+ examples:
+ application/json: |-
+ {
+ "code": 400,
+ "url": "/api/v1/connectors/{id}/services.json",
+ "message": "A validation error occurred",
+ "errorCount": 1,
+ "errors": {
+ "name": {
+ "unique": "The provided value is invalid"
+ }
+ }
+ }
+ 404:
+ description: Connector not found
+ schema:
+ $ref: '#/definitions/SimpleError'
+ examples:
+ application/json: |-
+ {
+ "message" : "The connector with the id {id} does not exist",
+ "url" : "/api/v1/connectors/{id}/services",
+ "code" : 404
+ }
+ '/connectors/{connector_id}/services/{service_id}':
+ get:
+ tags:
+ - connectors
+ - services
+ summary: Returns the service {service_id} if it is related to the connector {connector_id}
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - name : connector_id
+ in: path
+ description: The id of the connector
+ required: true
+ type: integer
+ - name : service_id
+ in: path
+ description: The id of the service
+ required: true
+ type: integer
+ responses:
+ 200:
+ description: Successful operation
+ schema:
+ $ref: '#/definitions/Service'
+ examples:
+ application/json: |-
+ {
+ "id" : 2,
+ "name" : "helios",
+ "connector_id" : 1
+
+ }
+ 404:
+ description: '[Connector|Service] not found'
+ schema:
+ $ref: '#/definitions/SimpleError'
+ examples:
+ application/json: |-
+ {
+ "message" : "The [connector|service] with the id [{connector_id}|{service_id}] does not exist",
+ "url" : "/api/v1/connectors/{connector_id}/services/{service_id}",
+ "code" : 404
+ }
+ delete:
+ tags:
+ - connectors
+ - services
+ summary: Deletes a service based on a single id
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - name: connector_id
+ in: path
+ description: id of the connector
+ required: true
+ type: integer
+ - name: service_id
+ in: path
+ description: id of the service to delete
+ required: true
+ type: integer
+ responses:
+ 204:
+ description: Successful operation
+ schema: { }
+ 404:
+ description: '[Connector|Service] not found'
+ schema:
+ $ref: '#/definitions/SimpleError'
+ examples:
+ application/json: |-
+ {
+ "message" : "The [connector|service] with the id [{connector_id}|{service_id}] does not exist",
+ "url" : "/api/v1/connectors/{connector_id/services/{service_id}}",
+ "code" : 404
+ }
definitions:
User:
properties:
url:
description: The URL address where the connector lives
type: string
+ Service:
+ properties:
+ id:
+ description: The id of the service
+ type: integer
+ name:
+ description: The name of the service
+ type: string
+ connector_id:
+ description: The id of the parent connector
+ type: integer
Pagination:
properties:
page_count: