Toutes les pages
Propulsé par GitBook
1 sur 1

users

User related operations

List all users

get
Paramètres de requête
qstringOptionnel

The search query

sortstring · enumOptionnel

The field (and direction) on which sorting apply

Valeurs possibles:
pageintegerOptionnel

The page to display

page_sizeintegerOptionnel

The page size

Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
get
GET /api/1/users/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

{
  "data": [
    {
      "about": "text",
      "active": true,
      "avatar": "text",
      "avatar_thumbnail": "text",
      "email": {},
      "first_name": "text",
      "id": "text",
      "last_login_at": {},
      "last_name": "text",
      "metrics": {},
      "organizations": [
        {
          "class": "text",
          "id": "text",
          "acronym": "text",
          "badges": [
            {
              "kind": "text"
            }
          ],
          "logo": "text",
          "logo_thumbnail": "text",
          "name": "text",
          "page": "text",
          "slug": "text",
          "uri": "text"
        }
      ],
      "page": "text",
      "roles": [
        "text"
      ],
      "since": "2025-06-20T12:35:00.842Z",
      "slug": "text",
      "uri": "text",
      "website": "text"
    }
  ],
  "next_page": "text",
  "page": 1,
  "page_size": 1,
  "previous_page": "text",
  "total": 1
}

Create a new object

post
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Corps
aboutstring · markdownOptionnel

The user self description

activebooleanOptionnel
avatarstringOptionnel

The user avatar URL

avatar_thumbnailstringOptionnel

The user avatar thumbnail URL. This is the square (500x500) and cropped version.

emailobjectLecture seuleOptionnel

The user email

first_namestringRequis

The user first name

idstringRequis

The user identifier

last_login_atobjectLecture seuleOptionnel

The user last connection date (only present for global admins and on /me)

last_namestringRequis

The user last name

metricsobjectLecture seuleOptionnel

The user metrics

pagestringLecture seuleOptionnel

The user profile page URL

rolesstring[]Optionnel

Site wide user roles

sincestring · date-timeRequis

The registeration date

slugstringRequis

The user permalink string

uristringRequis

The user API URI

websitestringOptionnel

The user website

Réponses
201
Success
application/json
400
Validation error
post
POST /api/1/users/ HTTP/1.1
Host: www.data.gouv.fr
Content-Type: application/json
Accept: */*
Content-Length: 335

{
  "about": "text",
  "active": true,
  "avatar": "text",
  "avatar_thumbnail": "text",
  "first_name": "text",
  "id": "text",
  "last_name": "text",
  "organizations": [
    {
      "class": "text",
      "id": "text",
      "acronym": "text",
      "logo": "text",
      "logo_thumbnail": "text",
      "slug": "text"
    }
  ],
  "roles": [
    "text"
  ],
  "since": "2025-06-20T12:35:00.842Z",
  "slug": "text",
  "uri": "text",
  "website": "text"
}
{
  "about": "text",
  "active": true,
  "avatar": "text",
  "avatar_thumbnail": "text",
  "email": {},
  "first_name": "text",
  "id": "text",
  "last_login_at": {},
  "last_name": "text",
  "metrics": {},
  "organizations": [
    {
      "class": "text",
      "id": "text",
      "acronym": "text",
      "badges": [
        {
          "kind": "text"
        }
      ],
      "logo": "text",
      "logo_thumbnail": "text",
      "name": "text",
      "page": "text",
      "slug": "text",
      "uri": "text"
    }
  ],
  "page": "text",
  "roles": [
    "text"
  ],
  "since": "2025-06-20T12:35:00.842Z",
  "slug": "text",
  "uri": "text",
  "website": "text"
}

List all possible user roles

get
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
get
GET /api/1/users/roles/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

[
  {
    "name": "text"
  }
]

Suggest users

get
Paramètres de requête
qstringRequis

The string to autocomplete/suggest

sizestringOptionnel

The amount of suggestion to fetch (between 1 and 20)

Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
get
GET /api/1/users/suggest/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

[
  {
    "avatar_url": "text",
    "email": {},
    "first_name": "text",
    "id": "text",
    "last_name": "text",
    "slug": "text"
  }
]

List all followers for a given object

get
Paramètres de chemin
idanyRequis
Paramètres de requête
pageintegerOptionnel

The page to fetch

page_sizeintegerOptionnel

The page size to fetch

userstringOptionnel

Filter follower by user, it allows to check if a user is following the object

Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
get
GET /api/1/users/{id}/followers/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

{
  "data": [
    {
      "follower": {
        "class": "text",
        "id": "text",
        "avatar": "text",
        "avatar_thumbnail": "text",
        "first_name": "text",
        "last_name": "text",
        "page": "text",
        "slug": "text",
        "uri": "text"
      },
      "id": "text",
      "since": "2025-06-20T12:35:00.842Z"
    }
  ],
  "next_page": "text",
  "page": 1,
  "page_size": 1,
  "previous_page": "text",
  "total": 1
}

Follow a user given its ID

post
Paramètres de chemin
idanyRequis
Réponses
403
When trying to follow yourself
post
POST /api/1/users/{id}/followers/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
403

When trying to follow yourself

Aucun contenu

Unfollow an object given its ID

delete

Returns the number of followers left after the operation

Paramètres de chemin
idanyRequis
Réponses
200
Success
delete
DELETE /api/1/users/{id}/followers/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

Aucun contenu

Get a user given its identifier

get
Paramètres de chemin
useranyRequis
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
404
User not found
410
User is not active or has been deleted
get
GET /api/1/users/{user}/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
{
  "about": "text",
  "active": true,
  "avatar": "text",
  "avatar_thumbnail": "text",
  "email": {},
  "first_name": "text",
  "id": "text",
  "last_login_at": {},
  "last_name": "text",
  "metrics": {},
  "organizations": [
    {
      "class": "text",
      "id": "text",
      "acronym": "text",
      "badges": [
        {
          "kind": "text"
        }
      ],
      "logo": "text",
      "logo_thumbnail": "text",
      "name": "text",
      "page": "text",
      "slug": "text",
      "uri": "text"
    }
  ],
  "page": "text",
  "roles": [
    "text"
  ],
  "since": "2025-06-20T12:35:00.842Z",
  "slug": "text",
  "uri": "text",
  "website": "text"
}

Update a user given its identifier

put
Paramètres de chemin
useranyRequis
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Corps
aboutstring · markdownOptionnel

The user self description

activebooleanOptionnel
avatarstringOptionnel

The user avatar URL

avatar_thumbnailstringOptionnel

The user avatar thumbnail URL. This is the square (500x500) and cropped version.

emailobjectLecture seuleOptionnel

The user email

first_namestringRequis

The user first name

idstringRequis

The user identifier

last_login_atobjectLecture seuleOptionnel

The user last connection date (only present for global admins and on /me)

last_namestringRequis

The user last name

metricsobjectLecture seuleOptionnel

The user metrics

pagestringLecture seuleOptionnel

The user profile page URL

rolesstring[]Optionnel

Site wide user roles

sincestring · date-timeRequis

The registeration date

slugstringRequis

The user permalink string

uristringRequis

The user API URI

websitestringOptionnel

The user website

Réponses
200
Success
application/json
400
Validation error
404
User not found
410
User is not active or has been deleted
put
PUT /api/1/users/{user}/ HTTP/1.1
Host: www.data.gouv.fr
Content-Type: application/json
Accept: */*
Content-Length: 335

{
  "about": "text",
  "active": true,
  "avatar": "text",
  "avatar_thumbnail": "text",
  "first_name": "text",
  "id": "text",
  "last_name": "text",
  "organizations": [
    {
      "class": "text",
      "id": "text",
      "acronym": "text",
      "logo": "text",
      "logo_thumbnail": "text",
      "slug": "text"
    }
  ],
  "roles": [
    "text"
  ],
  "since": "2025-06-20T12:35:00.842Z",
  "slug": "text",
  "uri": "text",
  "website": "text"
}
{
  "about": "text",
  "active": true,
  "avatar": "text",
  "avatar_thumbnail": "text",
  "email": {},
  "first_name": "text",
  "id": "text",
  "last_login_at": {},
  "last_name": "text",
  "metrics": {},
  "organizations": [
    {
      "class": "text",
      "id": "text",
      "acronym": "text",
      "badges": [
        {
          "kind": "text"
        }
      ],
      "logo": "text",
      "logo_thumbnail": "text",
      "name": "text",
      "page": "text",
      "slug": "text",
      "uri": "text"
    }
  ],
  "page": "text",
  "roles": [
    "text"
  ],
  "since": "2025-06-20T12:35:00.842Z",
  "slug": "text",
  "uri": "text",
  "website": "text"
}

Delete a user given its identifier

delete
Paramètres de chemin
useranyRequis
Paramètres de requête
no_mailbooleanOptionnel

Do not send a mail to notify the user of the deletion

delete_commentsbooleanOptionnel

Delete comments posted by the user upon user deletion

Réponses
204
Object deleted
403
When trying to delete yourself
404
User not found
410
User is not active or has been deleted
delete
DELETE /api/1/users/{user}/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*

Aucun contenu