Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @ egi.eu.

Difference between revisions of "GOCDB/Write API/Technical Documentation"

From EGIWiki
Jump to navigation Jump to search
(Created page with "= Write API Technical Documentation = == Description == == Authentication == == Example use using Curl == == Supported methods ==")
 
Line 4: Line 4:
== Example use using Curl ==
== Example use using Curl ==
== Supported methods ==
== Supported methods ==
{| cellspacing="0" cellpadding="7" border="1" class="wikitable"
|-
! scope="col" | '''Method'''
! scope="col" | '''URL'''
! scope="col" | '''Request Body'''
! scope="col" | '''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 any of the extension properties are already defined)
|-
| PUT
| <apiurl>/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
| <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). ''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
| <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/<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
| <apiurl>/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
| <apiurl>/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  ===
{| cellspacing="0" cellpadding="7" border="1" class="wikitable"
|-
! scope="col" | '''Method'''
! scope="col" | '''URL'''
! scope="col" | '''Request Body'''
! scope="col" | '''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 any of the extension properties are already defined)
|-
| PUT
| <apiurl>/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
| <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). ''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
| <apiurl>/v5/EndPoint/<End point ID>/ExtensionProperties
| None or empty<br>
| Removes all the extension properties for the identified SE
|-
| POST
| &lt;apiurl&gt;/v5/EndPoint/&lt;End point ID&gt;/ExtensionProperties/&lt;propertyName&gt;
| 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)
|-
| PUT
| &lt;apiurl&gt;/v5/EndPoint/&lt;End point ID&gt;/ExtensionProperties/&lt;propertyName&gt;
| 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
| &lt;apiurl&gt;/v5/EndPoint/&lt;End point ID&gt;/ExtensionProperties/&lt;propertyName&gt;
| 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":""}].

Revision as of 15:16, 25 October 2016

Write API Technical Documentation

Description

Authentication

Example use using Curl

Supported 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 any of the extension properties are already defined)
PUT <apiurl>/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 <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). 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 <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/<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 <apiurl>/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 <apiurl>/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 <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 any of the extension properties are already defined)
PUT <apiurl>/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 <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). 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 <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/<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 <apiurl>/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 <apiurl>/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":""}].