transfer

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

userall of

The user who requested the transfer

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-12-27T00:31:48.205Z",
    "id": "text",
    "owner": {
      "class": "text",
      "id": "text"
    },
    "recipient": {
      "class": "text",
      "id": "text"
    },
    "reponse_comment": "text",
    "responded": "2024-12-27T00:31:48.205Z",
    "status": "pending",
    "subject": {
      "class": "text",
      "id": "text"
    },
    "user": {
      "class": "text",
      "id": "text",
      "avatar": "text",
      "avatar_thumbnail": "text",
      "first_name": "text",
      "last_name": "text",
      "page": "text",
      "slug": "text",
      "uri": "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

userall of

The user who requested the transfer

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-12-27T00:31:48.205Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-12-27T00:31:48.205Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  },
  "user": {
    "class": "text",
    "id": "text",
    "avatar": "text",
    "avatar_thumbnail": "text",
    "first_name": "text",
    "last_name": "text",
    "page": "text",
    "slug": "text",
    "uri": "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

userall of

The user who requested the transfer

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-12-27T00:31:48.205Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-12-27T00:31:48.205Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  },
  "user": {
    "class": "text",
    "id": "text",
    "avatar": "text",
    "avatar_thumbnail": "text",
    "first_name": "text",
    "last_name": "text",
    "page": "text",
    "slug": "text",
    "uri": "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

userall of

The user who requested the transfer

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-12-27T00:31:48.205Z",
  "id": "text",
  "owner": {
    "class": "text",
    "id": "text"
  },
  "recipient": {
    "class": "text",
    "id": "text"
  },
  "reponse_comment": "text",
  "responded": "2024-12-27T00:31:48.205Z",
  "status": "pending",
  "subject": {
    "class": "text",
    "id": "text"
  },
  "user": {
    "class": "text",
    "id": "text",
    "avatar": "text",
    "avatar_thumbnail": "text",
    "first_name": "text",
    "last_name": "text",
    "page": "text",
    "slug": "text",
    "uri": "text"
  }
}

Dernière mise à jour