ARI: Add subscription support
[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": "getEndpoints",
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": "getEndpointsByTech",
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                                 }
40                         ]
41                 },
42                 {
43                         "path": "/endpoints/{tech}/{resource}",
44                         "description": "Single endpoint",
45                         "operations": [
46                                 {
47                                         "httpMethod": "GET",
48                                         "summary": "Details for an endpoint.",
49                                         "nickname": "getEndpoint",
50                                         "responseClass": "Endpoint",
51                                         "parameters": [
52                                                 {
53                                                         "name": "tech",
54                                                         "description": "Technology of the endpoint",
55                                                         "paramType": "path",
56                                                         "dataType": "string"
57                                                 },
58                                                 {
59                                                         "name": "resource",
60                                                         "description": "ID of the endpoint",
61                                                         "paramType": "path",
62                                                         "dataType": "string"
63                                                 }
64                                         ]
65                                 }
66                         ]
67                 }
68         ],
69         "models": {
70                 "Endpoint": {
71                         "id": "Endpoint",
72                         "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.",
73                         "properties": {
74                                 "technology": {
75                                         "type": "string",
76                                         "description": "Technology of the endpoint",
77                                         "required": true
78                                 },
79                                 "resource": {
80                                         "type": "string",
81                                         "description": "Identifier of the endpoint, specific to the given technology.",
82                                         "required": true
83                                 },
84                                 "state": {
85                                         "type": "string",
86                                         "description": "Endpoint's state",
87                                         "required": false,
88                                         "allowableValues": {
89                                                 "valueType": "LIST",
90                                                 "values": [
91                                                         "unknown",
92                                                         "offline",
93                                                         "online"
94                                                 ]
95                                         }
96                                 },
97                                 "channel_ids": {
98                                         "type": "List[string]",
99                                         "description": "Id's of channels associated with this endpoint",
100                                         "required": true
101                                 }
102                         }
103                 }
104         }
105 }