ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
[asterisk/asterisk.git] / rest-api / api-docs / endpoints.json
1 {
2         "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
3         "_author": "David M. Lee, II <dlee@digium.com>",
4         "_svn_revision": "$Revision$",
5         "apiVersion": "0.0.1",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/stasis",
8         "resourcePath": "/api-docs/endpoints.{format}",
9         "apis": [
10                 {
11                         "path": "/endpoints",
12                         "description": "Asterisk endpoints",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "List all endpoints.",
17                                         "nickname": "list",
18                                         "responseClass": "List[Endpoint]"
19                                 }
20                         ]
21                 },
22                 {
23                         "path": "/endpoints/{tech}",
24                         "description": "Asterisk endpoints",
25                         "operations": [
26                                 {
27                                         "httpMethod": "GET",
28                                         "summary": "List available endoints for a given endpoint technology.",
29                                         "nickname": "listByTech",
30                                         "responseClass": "List[Endpoint]",
31                                         "parameters": [
32                                                 {
33                                                         "name": "tech",
34                                                         "description": "Technology of the endpoints (sip,iax2,...)",
35                                                         "paramType": "path",
36                                                         "dataType": "string"
37                                                 }
38                                         ],
39                                         "errorResponses": [
40                                                 {
41                                                         "code": 404,
42                                                         "reason": "Endpoints not found"
43                                                 }
44                                         ]
45                                 }
46                         ]
47                 },
48                 {
49                         "path": "/endpoints/{tech}/{resource}",
50                         "description": "Single endpoint",
51                         "operations": [
52                                 {
53                                         "httpMethod": "GET",
54                                         "summary": "Details for an endpoint.",
55                                         "nickname": "get",
56                                         "responseClass": "Endpoint",
57                                         "parameters": [
58                                                 {
59                                                         "name": "tech",
60                                                         "description": "Technology of the endpoint",
61                                                         "paramType": "path",
62                                                         "dataType": "string"
63                                                 },
64                                                 {
65                                                         "name": "resource",
66                                                         "description": "ID of the endpoint",
67                                                         "paramType": "path",
68                                                         "dataType": "string"
69                                                 }
70                                         ],
71                                         "errorResponses": [
72                                                 {
73                                                         "code": 404,
74                                                         "reason": "Endpoints not found"
75                                                 }
76                                         ]
77                                 }
78                         ]
79                 }
80         ],
81         "models": {
82                 "Endpoint": {
83                         "id": "Endpoint",
84                         "description": "An external device that may offer/accept calls to/from Asterisk.\n\nUnlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.",
85                         "properties": {
86                                 "technology": {
87                                         "type": "string",
88                                         "description": "Technology of the endpoint",
89                                         "required": true
90                                 },
91                                 "resource": {
92                                         "type": "string",
93                                         "description": "Identifier of the endpoint, specific to the given technology.",
94                                         "required": true
95                                 },
96                                 "state": {
97                                         "type": "string",
98                                         "description": "Endpoint's state",
99                                         "required": false,
100                                         "allowableValues": {
101                                                 "valueType": "LIST",
102                                                 "values": [
103                                                         "unknown",
104                                                         "offline",
105                                                         "online"
106                                                 ]
107                                         }
108                                 },
109                                 "channel_ids": {
110                                         "type": "List[string]",
111                                         "description": "Id's of channels associated with this endpoint",
112                                         "required": true
113                                 }
114                         }
115                 }
116         }
117 }