transfer

List all transfer requests

GET//www.data.gouv.fr/api/1/transfer/
Header parameters
Response

Success

Body
commentstring

A comment about the transfer request

createdstring (date-time)

The transfer request date

idstring

The transfer unique identifier

ownerall of

The user or organization currently owning the transfered object

recipientall of

The user or organization receiving the transfered object

reponse_commentstring

A comment about the transfer response

respondedstring (date-time)

The transfer response date

statusenum

The current transfer request status

Example: "pending"
pendingacceptedrefused
subjectall of

The transfered object

Request
const response = await fetch('//www.data.gouv.fr/api/1/transfer/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "comment": "text",
    "created": "2024-11-21T06:23:57.982Z",
    "id": "text",
    "owner": {
      "class": "text",
      "id": "text"
    },
    "recipient": {
      "class": "text",
      "id": "text"
    },
    "reponse_comment": "text",
    "responded": "2024-11-21T06:23:57.982Z",
    "status": "pending",
    "subject": {
      "class": "text",
      "id": "text"
    }
  }
]

Initiate transfer request

POST//www.data.gouv.fr/api/1/transfer/
Header parameters
Body
comment*string

An explanation about the transfer request

recipient*all of

The transfer recipient, either an user or an organization

subject*all of

The transfered subject

Response

Success

Body
commentstring

A comment about the transfer request

createdstring (date-time)

The transfer request date

idstring

The transfer unique identifier

ownerall of

The user or organization currently owning the transfered object

recipientall of

The user or organization receiving the transfered object

reponse_commentstring

A comment about the transfer response

respondedstring (date-time)

The transfer response date

statusenum

The current transfer request status

Example: "pending"
pendingacceptedrefused
subjectall of

The transfered object

Request
const response = await fetch('//www.data.gouv.fr/api/1/transfer/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "comment": "text",
      "recipient": {
        "class": "text",
        "id": "text"
      },
      "subject": {
        "class": "text",
        "id": "text"
      }
    }),
});
const data = await response.json();
Response
{
  "comment": "text",
  "created": "2024-11-21T06:23:57.982Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-11-21T06:23:57.982Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  }
}

Fetch a transfer request given its identifier

GET//www.data.gouv.fr/api/1/transfer/{id}/
Path parameters
id*string
Header parameters
Response

Success

Body
commentstring

A comment about the transfer request

createdstring (date-time)

The transfer request date

idstring

The transfer unique identifier

ownerall of

The user or organization currently owning the transfered object

recipientall of

The user or organization receiving the transfered object

reponse_commentstring

A comment about the transfer response

respondedstring (date-time)

The transfer response date

statusenum

The current transfer request status

Example: "pending"
pendingacceptedrefused
subjectall of

The transfered object

Request
const response = await fetch('//www.data.gouv.fr/api/1/transfer/{id}/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "comment": "text",
  "created": "2024-11-21T06:23:57.982Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-11-21T06:23:57.982Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  }
}

Respond to a transfer request

POST//www.data.gouv.fr/api/1/transfer/{id}/
Path parameters
id*string
Header parameters
Body
commentstring

An optional comment about the transfer response

response*enum

The response

Example: "accept"
acceptrefuse
Response

Success

Body
commentstring

A comment about the transfer request

createdstring (date-time)

The transfer request date

idstring

The transfer unique identifier

ownerall of

The user or organization currently owning the transfered object

recipientall of

The user or organization receiving the transfered object

reponse_commentstring

A comment about the transfer response

respondedstring (date-time)

The transfer response date

statusenum

The current transfer request status

Example: "pending"
pendingacceptedrefused
subjectall of

The transfered object

Request
const response = await fetch('//www.data.gouv.fr/api/1/transfer/{id}/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "response": "accept"
    }),
});
const data = await response.json();
Response
{
  "comment": "text",
  "created": "2024-11-21T06:23:57.982Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-11-21T06:23:57.982Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  }
}

Dernière mise à jour