Difference between revisions of "GOCDB/Write API/Development"
< GOCDB
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
The following table shows the methods and URLs that we plan to implement | The following table shows the methods and URLs that we plan to implement | ||
=== Site methods === | |||
{| cellspacing="0" cellpadding="7" border="1" class="wikitable" | {| cellspacing="0" cellpadding="7" border="1" class="wikitable" | ||
|- | |- | ||
Line 16: | Line 17: | ||
|- | |- | ||
| POST | | POST | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Adds the extension properties defined in the request to the | | Adds the extension properties defined in the request to the Site with the given ID (fails if there are already extension properties) | ||
|- | |- | ||
| PUT | | PUT | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Replaces the extension properties for the | | Replaces the extension properties for the site with the given ID with those in the request (If none are currently defined, the it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Removes all the extension properties specified in the request body for the identified | | Removes all the extension properties specified in the request body for the identified site (fails if any of the listed properties are not currently defined) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | ||
| None or empty | | None or empty | ||
| Removes all the extension properties for the identified | | Removes all the extension properties for the identified site | ||
|- | |- | ||
| POST | | POST | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property of the named | | Adds an extension property of the named site with the named name and value in the request (fails if property with that name is already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Updates the extension property of the named | | Updates the extension property of the named site with the named name and value in the request (If none of that name is already defined, then it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | ||
| None or empty | | None or empty | ||
| Removes the named extension property from the named | | Removes the named extension property from the named site (fails if request body is present, or the named property is not defined for the identified Site) | ||
|} | |||
=== Service methods === | |||
{| cellspacing="0" cellpadding="7" border="1" class="wikitable" | |||
|- | |||
! scope="col" | '''Method''' | |||
! scope="col" | '''URL''' | |||
! scope="col" | '''Request Body''' | |||
! scope="col" | '''Function''' | |||
|- | |- | ||
| POST | | POST | ||
Line 84: | Line 94: | ||
| None or empty | | None or empty | ||
| Removes the named extension property from the named service (fails if request body is present, or the named property is not defined for the identified site) | | Removes the named extension property from the named service (fails if request body is present, or the named property is not defined for the identified site) | ||
|} | |||
=== Service Endpoint methods === | |||
{| cellspacing="0" cellpadding="7" border="1" class="wikitable" | |||
|- | |||
! scope="col" | '''Method''' | |||
! scope="col" | '''URL''' | |||
! scope="col" | '''Request Body''' | |||
! scope="col" | '''Function''' | |||
|- | |- | ||
| POST | | POST | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Adds the extension properties defined in the request to the | | Adds the extension properties defined in the request to the SE with the given ID (fails if there are already extension properties) | ||
|- | |- | ||
| PUT | | PUT | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Replaces the extension properties for the | | Replaces the extension properties for the SE with the given ID with those in the request (If none are currently defined, the it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| Removes all the extension properties specified in the request body for the identified | | Removes all the extension properties specified in the request body for the identified SE (fails if any of the listed properties are not currently defined)<br> | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | ||
| None or empty | | None or empty<br> | ||
| Removes all the extension properties for the identified | | Removes all the extension properties for the identified SE | ||
|- | |- | ||
| POST | | POST | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2''<br> | ||
| Adds an extension property of the named | | Adds an extension property of the named SE with the named name and value in the request (fails if property with that name is already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Updates the extension property of the named | | Updates the extension property of the named SE with the named name and value in the request (If none of that name is already defined, then it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| <apiurl>/v5/ | | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | ||
| None or empty | | None or empty | ||
| Removes the named extension property from the named | | Removes the named extension property from the named SE (fails if request body is present, or the named property is not defined for the identified SE) | ||
|} | |} | ||
Revision as of 16:11, 25 August 2016
Write API Development
Timeline
The Alpha release for the write API is planned for the W/C 19th of September. This will allow at least a subset of the initially panned urls to be tested, including authentication.
Initially supported urls
The following table shows the methods and URLs that we plan to implement
Site methods
Method | URL | Request Body | Function |
---|---|---|---|
POST | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Adds the extension properties defined in the request to the Site with the given ID (fails if there are already extension properties) |
PUT | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Replaces the extension properties for the site with the given ID with those in the request (If none are currently defined, the it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Removes all the extension properties specified in the request body for the identified site (fails if any of the listed properties are not currently defined) |
DELETE | <apiurl>/v5/Site/<Site ID>/ExtensionProperties | None or empty | Removes all the extension properties for the identified site |
POST | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 | Adds an extension property of the named site with the named name and value in the request (fails if property with that name is already defined) |
PUT | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 | Updates the extension property of the named site with the named name and value in the request (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/Site/<Site ID>/ExtensionProperties/<name> | None or empty | Removes the named extension property from the named site (fails if request body is present, or the named property is not defined for the identified Site) |
Service methods
Method | URL | Request Body | Function |
---|---|---|---|
POST | <apiurl>/v5/Service/<Service ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Adds the extension properties defined in the request to the service with the given ID (fails if there are already extension properties) |
PUT | <apiurl>/v5/Service/<Service ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Replaces the extension properties for the service with the given ID with those in the request (If none are currently defined, the it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/Service/<Service ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Removes all the extension properties specified in the request body for the identified service (fails if any of the listed properties are not currently defined) |
DELETE | <apiurl>/v5/Service/<Service ID>/ExtensionProperties | None or empty | Removes all the extension properties for the identified service |
POST | <apiurl>/v5/Service/<Service ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 | Adds an extension property of the named service with the named name and value in the request (fails if property with that name is already defined) |
PUT | <apiurl>/v5/Service/<Service ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 | Updates the extension property of the named service with the named name and value in the request (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/Service/<Service ID>/ExtensionProperties/<name> | None or empty | Removes the named extension property from the named service (fails if request body is present, or the named property is not defined for the identified site) |
Service Endpoint methods
Method | URL | Request Body | Function |
---|---|---|---|
POST | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Adds the extension properties defined in the request to the SE with the given ID (fails if there are already extension properties) |
PUT | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Replaces the extension properties for the SE with the given ID with those in the request (If none are currently defined, the it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | Removes all the extension properties specified in the request body for the identified SE (fails if any of the listed properties are not currently defined) |
DELETE | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties | None or empty |
Removes all the extension properties for the identified SE |
POST | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 |
Adds an extension property of the named SE with the named name and value in the request (fails if property with that name is already defined) |
PUT | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | Value in JSON Format e.g Note 2 | Updates the extension property of the named SE with the named name and value in the request (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties/<name> | None or empty | Removes the named extension property from the named SE (fails if request body is present, or the named property is not defined for the identified SE) |
Note 1: [{"PROPERTY1NAME":"PROPERTY1VALUE","PROPERTY2NAME":"PROPERTY2VALUE","PROPERTY3NAME":"PROPERTY3VALUE"}]
Note 2: [{"value":"PROPERTYVALUE"}]
Proposed authorisation mechanism
The proposed method for authentication for the write API is initially by X509 certificate. Each site will be able to define a list of authorised robot DNs that may make changes through the write API. The same authentication mechanism will be used as for the rest of GOCDB.
Github
The current working branch for this work can be found here.