This specification defines a RESTful API over HTTPS for the Transfer Process Protocol.
- 1 Introduction
- 2 Provider Path Bindings
- 2.1 The
transfersEndpoint (Provider-side) - 2.2 The
transfers/requestEndpoint (Provider-side) - 2.3 The
transfers/:providerPid/startEndpoint (Provider-side) - 2.4 The
transfers/:providerPid/completionEndpoint (Provider-side) - 2.5 The
transfers/:providerPid/terminationEndpoint (Provider-side) - 2.6 The
transfers/:providerPid/suspensionEndpoint (Provider-side)
- 2.1 The
- 3 Consumer Callback Path Bindings
-
The
<base>notation indicates the base URL for a Connector endpoint. For example, if the scheme ishttpsand the full hostname isconnector.example.com, the URL<base>/transfers/requestwill map tohttps://connector.example.com/transfers/request. -
All request and response messages must use the
application/jsonmedia type. Derived media types, e.g.,application/ld+jsonmay be exposed in addition.
In the event of a client request error, the Connector must return an appropriate HTTP 4xx client error code. If an error body is returned it must be a Transfer Error.
If a client or Provider makes a request that results in an invalid Transfer Process (TP) state transition as defined by the Transfer Process Protocol, it must return an HTTP code 400 (Bad Request) with a Transfer Error in the response body.
If the TP does not exist, the Consumer or Provider must return an HTTP 404 (Not Found) response.
If the client is not authorized, the Consumer or Provider must return an HTTP 404 (Not Found) response.
| Endpoint | Method | Description |
|---|---|---|
| https://provider.com/transfers/:providerPid | GET |
Section 2.1.1 |
| https://provider.com/transfers/request | POST |
Section 2.2.1 |
| https://provider.com/transfers/:providerPid/start | POST |
Section 2.3.1 |
| https://provider.com/transfers/:providerPid/completion | POST |
Section 2.4.1 |
| https://provider.com/transfers/:providerPid/termination | POST |
Section 2.5.1 |
| https://provider.com/transfers/:providerPid/suspension | POST |
Section 2.6.1 |
A CN can be accessed by a Consumer or Provider sending a GET request to transfers/:providerPid:
GET https://provider.com/transfers/:providerPid
Authorization: ...If the TP is found and the client is authorized, the Provider must return an HTTP 200 (OK) response and a body containing the Transfer Process:
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferProcess",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:state": "dspace:REQUESTED"
} Predefined states are: REQUESTED, STARTED, SUSPENDED, REQUESTED, COMPLETED, and TERMINATED.
A TP is started and placed in the REQUESTED state when a Consumer POSTs a Transfer Request Message to transfers/request:
POST https://provider.com/transfers/request
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferRequestMessage",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:agreementId": "urn:uuid:e8dc8655-44c2-46ef-b701-4cffdc2faa44",
"dct:format": "example:HTTP_PUSH",
"dspace:dataAddress": {
"@type": "dspace:DataAddress",
"dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP",
"dspace:endpoint": "http://example.com",
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
},
"dspace:callbackAddress": "https://......"
}-
The
callbackAddressproperty specifies the base endpointURLwhere the client receives messages associated with the TP. Support for theHTTPSscheme is required. Implementations may optionally support other URL schemes. -
Callback messages will be sent to paths under the base URL as described by this specification. Note that Providers should properly handle the cases where a trailing
/is included with or absent from thecallbackAddresswhen resolving full URL.
The Provider must return an HTTP 201 (Created) response with a body containing the Transfer Process:
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferProcess",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:state": "dspace:REQUESTED"
}The Consumer can POST a Transfer Start Message to attempt to start a TP after it has been suspended:
POST https://provider.com/transfers/:providerPid/start
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferStartMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:dataAddress": {
"@type": "dspace:DataAddress",
"dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP",
"dspace:endpoint": "http://example.com",
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
}
}If the TP's state is successfully transitioned, the Provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Consumer can POST a Transfer Completion Message to complete a TP:
POST https://provider.com/transfers/:providerPid/completion
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferCompletionMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833"
}If the TP's state is successfully transitioned, the Provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Consumer can POST a Transfer Termination Message to terminate a TP:
POST https://provider.com/transfers/:providerPid/termination
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferTerminationMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:code": "...",
"dspace:reason": [
...
]
}If the TP's state is successfully transitioned, the Provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Consumer can POST a Transfer Suspension Message to suspend a TP:
POST https://provider.com/transfers/:providerPid/suspension
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferSuspensionMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:code": "...",
"dspace:reason": [
...
]
}If the TP's state is successfully transitioned, the Provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
| Endpoint | Method | Description |
|---|---|---|
| https://consumer.com/:callback/transfers/:consumerPid/start | POST |
Section 3.2.1 |
| https://consumer.com/:callback/transfers/:consumerPid/completion | POST |
Section 3.3.1 |
| https://consumer.com/:callback/transfers/:consumerPid/termination | POST |
Section 3.4.1 |
| https://consumer.com/:callback/transfers/:consumerPid/suspension | POST |
Section 3.5.1 |
All callback paths are relative to the callbackAddress base URL specified in the Transfer Request Message that initiated a TP. For example, if the callbackAddress is specified as https://consumer.com/callback and a callback path binding is transfers/:consumerPid/start, the resolved URL will be https://consumer.com/callback/transfers/:consumerPid/start.
The Provider can POST a Transfer Start Message to indicate the start of a TP:
POST https://consumer.com/:callback/transfers/:consumerPid/start
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferStartMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:dataAddress": {
"@type": "dspace:DataAddress",
"dspace:endpointType": "https://w3id.org/idsa/v4.1/HTTP",
"dspace:endpoint": "http://example.com",
"dspace:endpointProperties": [
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authorization",
"dspace:value": "TOKEN-ABCDEFG"
},
{
"@type": "dspace:EndpointProperty",
"dspace:name": "authType",
"dspace:value": "bearer"
}
]
}
}If the TP's state is successfully transitioned, the Consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Provider can POST a Transfer Completion Message to complete a TP:
POST https://consumer.com/:callback/transfers/:consumerPid/completion
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferCompletionMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833"
}If the TP's state is successfully transitioned, the Consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Provider can POST a Transfer Termination Message to terminate a TP:
POST https://consumer.com/:callback/transfers/:consumerPid/termination
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferTerminationMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:code": "...",
"dspace:reason": [
...
]
}If the TP's state is successfully transitioned, the Consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
The Provider can POST a Transfer Suspension Message to suspend a TP:
POST https://consumer.com/:callback/transfers/:consumerPid/suspension
Authorization: ...
{
"@context": "https://w3id.org/dspace/2024/1/context.json",
"@type": "dspace:TransferSuspensionMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:code": "...",
"dspace:reason": [
...
]
}If the TP's state is successfully transitioned, the Consumer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.