/
api-2-index.yml
192 lines (177 loc) · 5.86 KB
/
api-2-index.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Copyright (c) 2017 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
openapi: 3.0.0
info:
title: Eclipse Ditto HTTP API
version: "2"
description: |-
JSON-based, REST-like API for Eclipse Ditto
The Eclipse Ditto HTTP API uses response status codes (see [RFC 7231](https://tools.ietf.org/html/rfc7231#section-6))
to indicate whether a specific request has been successfully completed, or not.
However, the descriptions we provide additionally to the status code (e.g. in our API docs, or error codes like. "things.entitiy.tooLarge") might change without advance notice. These are not be considered as official API, and must therefore not be applied in your applications or tests.
servers:
- url: https://ditto.eclipse.org/api/2
description: "online Ditto Sandbox"
- url: /api/2
description: "local Ditto"
tags:
- name: Things
description: Manage every thing
- name: Features
description: Structure the features of your things
- name: Policies
description: Control access to your things
- name: Things-Search
description: Find every thing
- name: Messages
description: Talk with your things
security:
# - Google:
# - openid
- basicAuth: [ ]
- bearerAuth: [ ]
paths:
###
### Things
###
/things:
$ref: "./paths/things/index.yml"
'/things/{thingId}':
$ref: "./paths/things/thing.yml"
'/things/{thingId}/definition':
$ref: "./paths/things/definition.yml"
'/things/{thingId}/policyId':
$ref: "./paths/things/policyid.yml"
'/things/{thingId}/attributes':
$ref: "./paths/things/attributes.yml"
'/things/{thingId}/attributes/{attributePath}':
$ref: "./paths/things/attribute.yml"
###
### Features
###
'/things/{thingId}/features':
$ref: "./paths/features/index.yml"
'/things/{thingId}/features/{featureId}':
$ref: "./paths/features/feature.yml"
'/things/{thingId}/features/{featureId}/definition':
$ref: "./paths/features/definition.yml"
'/things/{thingId}/features/{featureId}/properties':
$ref: "./paths/features/properties.yml"
'/things/{thingId}/features/{featureId}/properties/{propertyPath}':
$ref: "./paths/features/property.yml"
'/things/{thingId}/features/{featureId}/desiredProperties':
$ref: "./paths/features/desiredProperties.yml"
'/things/{thingId}/features/{featureId}/desiredProperties/{propertyPath}':
$ref: "./paths/features/desiredProperty.yml"
###
### Messages
###
'/things/{thingId}/inbox/claim':
$ref: "./paths/messages/inbox-claim.yml"
'/things/{thingId}/inbox/messages/{messageSubject}':
$ref: "./paths/messages/inbox-message.yml"
'/things/{thingId}/outbox/messages/{messageSubject}':
$ref: "./paths/messages/outbox-message.yml"
'/things/{thingId}/features/{featureId}/inbox/messages/{messageSubject}':
$ref: "./paths/messages/feature-inbox-message.yml"
'/things/{thingId}/features/{featureId}/outbox/messages/{messageSubject}':
$ref: "./paths/messages/feature-outbox-message.yml"
###
### Policies
###
'/policies/{policyId}':
$ref: "./paths/policies/policy.yml"
'/policies/{policyId}/entries':
$ref: "./paths/policies/entries.yml"
'/policies/{policyId}/entries/{label}':
$ref: "./paths/policies/entry.yml"
'/policies/{policyId}/entries/{label}/subjects':
$ref: "./paths/policies/subjects.yml"
'/policies/{policyId}/entries/{label}/subjects/{subjectId}':
$ref: "./paths/policies/subject.yml"
'/policies/{policyId}/entries/{label}/resources':
$ref: "./paths/policies/resources.yml"
'/policies/{policyId}/entries/{label}/resources/{resourcePath}':
$ref: "./paths/policies/resource.yml"
###
### Who Am I
###
'/whoami':
$ref: "./paths/whoami/index.yml"
###
### Things-Search
###
/search/things:
$ref: "./paths/search/things.yml"
/search/things/count:
$ref: "./paths/search/things-count.yml"
components:
schemas:
Error:
$ref: "./schemas/error.yml"
AdvancedError:
$ref: "./schemas/advancedError.yml"
Attributes:
$ref: "./schemas/attributes.yml"
Definition:
$ref: "./schemas/definition.yml"
FeatureDefinition:
$ref: "./schemas/featureDefinition.yml"
FeatureProperties:
$ref: "./schemas/featureProperties.yml"
FeatureDesiredProperties:
$ref: "./schemas/featureDesiredProperties.yml"
Feature:
$ref: "./schemas/feature.yml"
SearchResultThings:
$ref: "./schemas/searchResultThings.yml"
SearchResultThingsCount:
type: integer
NewThing:
$ref: "./schemas/newThing.yml"
Thing:
$ref: "./schemas/thing.yml"
Policy:
$ref: "./schemas/policy.yml"
PolicyEntries:
$ref: "./schemas/policyEntries.yml"
PolicyEntry:
$ref: "./schemas/policyEntry.yml"
Subjects:
$ref: "./schemas/subjects.yml"
SubjectEntry:
$ref: "./schemas/subjectEntry.yml"
Resources:
$ref: "./schemas/resources.yml"
ResourceEntry:
$ref: "./schemas/resourceEntry.yml"
ResourceEntryRestricted:
$ref: "./schemas/resourceEntryRestricted.yml"
Permission:
$ref: "./schemas/permission.yml"
Features:
$ref: "./schemas/features.yml"
WhoAmI:
$ref: "./schemas/whoami.yml"
WhoAmISubject:
$ref: "./schemas/whoamiSubject.yml"
securitySchemes:
basicAuth:
type: http
description: |-
Eclipse Ditto sandbox demo user (demo1 ... demo9) + password (demo)
scheme: basic
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: |-
A JSON Web Token issued by a supported OAuth 2.0 Identity Provider, e.g. a Google "id_token"