Difference between revisions of "GOCDB/Write API/Technical Documentation"
< GOCDB
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== Authentication == | == Authentication == | ||
== Example use using Curl == | == Example use using Curl == | ||
https://goc.egi.eu/gocdbpi/ | |||
== Supported methods == | == Supported methods == | ||
The following tables list the methods supported in the write API, and the associated URLs. | |||
=== Site methods === | === Site methods === | ||
Line 15: | Line 18: | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/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 Site with the given ID (fails if extension properties already exist with any of the specified property names) | | Adds the extension properties defined in the request to the Site with the given ID (fails if extension properties already exist with any of the specified property names) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/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'' | ||
| For the site with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | | For the site with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/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 site (fails if any of the listed properties are not currently defined. ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | | 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. ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties | ||
| None or empty | | None or empty | ||
| Removes all the extension properties for the identified site | | Removes all the extension properties for the identified site | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property to the identified site with the given name and value in the request (fails if property with that name is already defined) | | Adds an extension property to the identified site with the given name and value in the request (fails if property with that name is already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property to the identified site, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | | Adds an extension property to the identified site, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | ||
| None or empty | | 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) | | 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) | ||
Line 59: | Line 62: | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service 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 service with the given ID (fails if any of the extension properties are already defined) | | Adds the extension properties defined in the request to the service with the given ID (fails if any of the extension properties are already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties | ||
| Key value pairs in JSON Format e.g. ''Note 1'' | | Key value pairs in JSON Format e.g. ''Note 1'' | ||
| For the service with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | | For the service with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service 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 service (fails if any of the listed properties are not currently defined). ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | | 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). ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties | ||
| None or empty | | None or empty | ||
| Removes all the extension properties for the identified service | | Removes all the extension properties for the identified service | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property to the identified service with the given name and value in the request (fails if property with that name is already defined) | | Adds an extension property to the identified service with the given name and value in the request (fails if property with that name is already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property to the identified service, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | | Adds an extension property to the identified service, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | ||
| 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) | ||
Line 104: | Line 107: | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/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 SE with the given ID (fails if any of the extension properties are already defined) | | Adds the extension properties defined in the request to the SE with the given ID (fails if any of the extension properties are already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/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'' | ||
| For the SE with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | | For the SE with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/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 SE (fails if any of the listed properties are not currently defined). ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | | 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). ''Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples.'' | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties | ||
| None or empty<br> | | None or empty<br> | ||
| Removes all the extension properties for the identified SE | | Removes all the extension properties for the identified SE | ||
|- | |- | ||
| POST | | POST | ||
| | | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2''<br> | | Value in JSON Format e.g ''Note 2''<br> | ||
| Adds an extension property to the identified SE with the given name and value in the request (fails if property with that name is already defined) | | Adds an extension property to the identified SE with the given name and value in the request (fails if property with that name is already defined) | ||
|- | |- | ||
| PUT | | PUT | ||
| | | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | ||
| Value in JSON Format e.g ''Note 2'' | | Value in JSON Format e.g ''Note 2'' | ||
| Adds an extension property to the identified SE, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | | Adds an extension property to the identified SE, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) | ||
|- | |- | ||
| DELETE | | DELETE | ||
| | | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | ||
| None or empty | | 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) | | 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 15:21, 25 October 2016
Write API Technical Documentation
Description
Authentication
Example use using Curl
Supported methods
The following tables list the methods supported in the write API, and the associated URLs.
Site methods
Method | URL | Request Body | Function |
---|---|---|---|
POST | https://goc.egi.eu/gocdbpi/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 extension properties already exist with any of the specified property names) |
PUT | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | For the site with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/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. Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples. |
DELETE | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties | None or empty | Removes all the extension properties for the identified site |
POST | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 | Adds an extension property to the identified site with the given name and value in the request (fails if property with that name is already defined) |
PUT | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 | Adds an extension property to the identified site, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/v5/Site/<Site ID>/ExtensionProperties/<propertyName> | 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 | https://goc.egi.eu/gocdbpi/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 any of the extension properties are already defined) |
PUT | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | For the service with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/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). Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples. |
DELETE | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties | None or empty | Removes all the extension properties for the identified service |
POST | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 | Adds an extension property to the identified service with the given name and value in the request (fails if property with that name is already defined) |
PUT | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 | Adds an extension property to the identified service, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/v5/Service/<Service ID>/ExtensionProperties/<propertyName> | 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 | https://goc.egi.eu/gocdbpi/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 any of the extension properties are already defined) |
PUT | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties | Key value pairs in JSON Format e.g. Note 1 | For the SE with the specified ID, adds the specified properties, overwriting any existing ones with the specified names (If none of them are currently defined, the it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/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). Note: values do not have to be defined, an empty string can be provided instead. If a value is provided, it must be correct. See Note 3 for examples. |
DELETE | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties | None or empty |
Removes all the extension properties for the identified SE |
POST | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 |
Adds an extension property to the identified SE with the given name and value in the request (fails if property with that name is already defined) |
PUT | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | Value in JSON Format e.g Note 2 | Adds an extension property to the identified SE, overwriting any exiting property with the given name (If none of that name is already defined, then it is functionally equivalent to POST) |
DELETE | https://goc.egi.eu/gocdbpi/v5/EndPoint/<End point ID>/ExtensionProperties/<propertyName> | 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"}]
Note 3: For DELETE methods, the following are functionally equivalent [{"PROPERTY1NAME":"PROPERTY1VALUE","PROPERTY2NAME":"PROPERTY2VALUE","PROPERTY3NAME":"PROPERTY3VALUE"}] and [{"PROPERTY1NAME":"","PROPERTY2NAME":"","PROPERTY3NAME":""}].