RSE Rest API¶
Overview
Details
-
GET
/rses/
¶ List all RSEs.
Query Parameters: - expression – The returned list only contains RSE matching this expression.
Response Headers: - Content-Type – application/x-json-stream
Status Codes: - 200 OK – DIDs found.
- 400 Bad Request – Invalid RSE Expression.
- 401 Unauthorized – Invalid Auth Token.
- 500 Internal Server Error – Internal Error.
Returns: A list containing all RSEs.
-
GET
/rses/
(rse)/accounts/usage
¶ Get account usage and limit for one RSE.
Parameters: - rse – the RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
Returns: Line separated list of dict with account usage and limits.
-
GET
/rses/
(rse)/usage/history
¶ Get RSE usage information.
Parameters: - rse – the RSE name.
Response Headers: - Content-Type – application/x-json-stream
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
Returns: Line separated list of dictionary with RSE usage information.
-
PUT
/rses/
(rse)/protocols/
(scheme)/
(hostname)/
(port)¶ Updates attributes of an existing protocol entry. Because protocol identifier, hostname, and port are used as unique identifier they are immutable.
Parameters: - rse – The RSE name.
- scheme – The protocol identifier.
- hostname – The hostname defined for the scheme, used if more than one scheme is registered with the same identifier.
- port – The port registered for the hostname, ued if more than one scheme is registered with the same identifier and hostname.
Request JSON Object: - paramaters (dict) – parameter of the new protocol entry.
Status Codes: - 201 Created – Created.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 404 Not Found – RSE Protocol Not Supported.
- 404 Not Found – RSE Protocol Domain Not Supported.
- 409 Conflict – RSE Protocol Priority Error.
- 500 Internal Server Error – Internal Error.
-
POST
/rses/
(rse)/protocols/
(scheme)¶ Create a protocol for a given RSE.
Parameters: - rse – The RSE name.
- scheme – The protocol identifier.
Request JSON Object: - paramaters (dict) – parameter of the new protocol entry.
Status Codes: - 201 Created – Created.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 404 Not Found – RSE Protocol Domain Not Supported.
- 409 Conflict – RSE Protocol Priority Error.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)/protocols/
(scheme)¶ List all references of the provided RSE for the given protocol.
Parameters: - rse – The RSE name.
- scheme – The protocol identifier.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 404 Not Found – RSE Protocol Not Supported.
- 404 Not Found – RSE Protocol Domain Not Supported.
Returns: A list with detailed protocol information.
-
DELETE
/rses/
(rse)/protocols/
(scheme)/
(hostname)/
(port)¶ Deletes a protocol entry for the provided RSE.
Parameters: - rse – The RSE name.
- scheme – The protocol identifier.
- hostname – The hostname defined for the scheme, used if more than one scheme is registered with the same identifier.
- port – The port registered for the hostname, ued if more than one scheme is registered with the same identifier and hostname.
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 404 Not Found – RSE Protocol Not Supported.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)/protocols
¶ List all supported protocols of the given RSE.
Parameters: - rse – The RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Operation Not Supported.
- 404 Not Found – RSE Not Found.
- 404 Not Found – RSE Protocol Domain Not Supported.
- 404 Not Found – RSE Protocol Not Supported.
- 500 Internal Server Error – Internal Error.
Returns: A list containing all supported protocols and all their attributes.
-
GET
/rses/
(rse)/lfns2pfns
¶ Return PFNs for a set of LFNs. Formatted as a JSON object where the key is a LFN and the value is the corresponding PFN.
Parameters: - rse – The RSE name.
- scheme – The protocol identifier.
Query Parameters: - lfn – One or moref LFN to translate.
- scheme – Optional argument to help with the protocol selection (e.g., http / gsiftp / srm)
- domain – Optional argument used to select the protocol for wan or lan use cases.
- operation – Optional query argument to select the protoco for read-vs-writes.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 404 Not Found – RSE Protocol Not Supported.
- 404 Not Found – RSE Protocol Domain Not Supported.
- 500 Internal Server Error – Internal Error.
Returns: A list with detailed PFN information.
-
PUT
/rses/
(rse)/limits
¶ Update RSE limits.
Parameters: - rse – The RSE name.
Status Codes: - 200 OK – OK.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)/limits
¶ Get RSE limits.
Parameters: - rse – the RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
Returns: List of dictionaries with RSE limits.
-
PUT
/rses/
(rse)/usage
¶ Update RSE usage information.
Parameters: - rse – The RSE name.
Request JSON Object: - parameter (dict) – Dictionary with ‘source’, ‘used’, ‘free’ values to update.
Status Codes: - 200 OK – OK.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)/usage
¶ Get RSE usage information.
Parameters: - rse – the RSE name.
Query Parameters: - source – The information source, e.g., srm.
- per_account – Boolean whether the usage should be also calculated per account or not.
Response Headers: - Content-Type – application/x-json-stream
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
Returns: A list of dictionaries with the usage information.
-
POST
/rses/
(rse)/attr/
(key)¶ create RSE attribute with given RSE name.
Parameters: - rse – RSE name.
- key – Key attribute.
Request JSON Object: - parameter (dict) – Dictionary with ‘value’.
Status Codes: - 201 Created – Created.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 400 Bad Request – Key not defined.
- 401 Unauthorized – Invalid Auth Token.
- 409 Conflict – Attribute already exists.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)/attr
¶ list all RSE attributes for a RSE.
Parameters: - rse – RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 500 Internal Server Error – Internal Error.
Returns: A list containing all RSE attributes.
-
DELETE
/rses/
(rse)/attr/
(key)¶ Delete an RSE attribute for given RSE name.
Parameters: - rse – RSE name.
- key – The key name.
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 500 Internal Server Error – Internal Error.
-
PUT
/rses/
(source)/attr/
(destination)¶ Update distance information between source RSE and destination RSE.
Parameters: - source – The source RSE name.
- destination – The destination RSE name.
Status Codes: - 200 OK – OK.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
-
POST
/rses/
(source)/attr/
(destination)¶ Create distance information between source RSE and destination RSE.
Parameters: - source – The source RSE name.
- destination – The destination RSE name.
Status Codes: - 201 Created – Created.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE Not Found.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(source)/attr/
(destination)¶ Get RSE distance between source and destination.
Parameters: - source – the source RSE name.
- destination – the destination RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 500 Internal Server Error – Internal Error.
Returns: List of dictionaries with RSE distances.
-
PUT
/rses/
(rse)¶ Update RSE properties (e.g. name, availability).
Parameters: - rse – The RSE name.
Request JSON Object: - parameters (dict) – Dictionary of parameters to update.
Status Codes: - 201 Created – RSE updated successfully.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 409 Conflict – RSE not found.
- 409 Conflict – RSE already exists.
- 500 Internal Server Error – Internal Error.
-
POST
/rses/
(rse)¶ Create RSE with given name.
Parameters: - rse – The RSE name.
Request JSON Object: - deterministic (bool) – Boolean to know if the pfn is generated deterministically.
- volatile (bool) – Boolean for RSE cache.
- city (string) – City for the RSE.
- staging_area (bool) – Staging area.
- region_code (string) – The region code for the RSE.
- country_name (string) – The country.
- continent (string) – The continent.
- time_zone (string) – Timezone.
- ISP (string) – Internet Service Provider.
Status Codes: - 201 Created – RSE created successfully.
- 400 Bad Request – Cannot decode json parameter dictionary.
- 401 Unauthorized – Invalid Auth Token.
- 409 Conflict – RSE already exists.
- 409 Conflict – RSE not found.
- 500 Internal Server Error – Internal Error.
-
GET
/rses/
(rse)¶ Details about a specific RSE.
Parameters: - rse – the RSE name.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 500 Internal Server Error – Internal Error.
Returns: A list containing all RSEs.
-
DELETE
/rses/
(rse)¶ Disable RSE with given RSE name.
Parameters: - rse – the RSE name.
Status Codes: - 200 OK – OK.
- 401 Unauthorized – Invalid Auth Token.
- 404 Not Found – RSE not found.
- 500 Internal Server Error – Internal Error.