> For the complete documentation index, see [llms.txt](https://guides.data.gouv.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.data.gouv.fr/api-de-data.gouv.fr/reference/dataservices.md).

# dataservices

Dataservices related operation (beta)

## GET /dataservices/

> List or search all dataservices

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/":{"get":{"operationId":"list_dataservices","parameters":[{"schema":{"type":"integer","default":1,"exclusiveMinimum":0},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20,"exclusiveMinimum":0},"description":"The page size to fetch","in":"query","name":"page_size"},{"schema":{"type":"string","enum":["followers","views","title","base_api_url","created","last_modified","-followers","-views","-title","-base_api_url","-created","-last_modified"]},"description":"The field (and direction) on which sorting apply","in":"query","name":"sort"},{"schema":{"type":"string"},"description":"The search query","in":"query","name":"q"},{"schema":{"type":"string"},"in":"query","name":"topic"},{"schema":{"type":"string"},"in":"query","name":"reuse"},{"schema":{"type":"string"},"in":"query","name":"owner"},{"schema":{"type":"string"},"in":"query","name":"organization"},{"schema":{"type":"string","format":"my-custom-format"},"in":"query","name":"organization_badge"},{"schema":{"type":"string","enum":["open","open_with_account","restricted"]},"in":"query","name":"access_type"},{"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"in":"query","name":"tag"},{"schema":{"type":"boolean"},"in":"query","name":"featured"},{"schema":{"type":"string"},"in":"query","name":"contact_point"},{"schema":{"type":"string"},"in":"query","name":"dataset"},{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataservicePage"}}}}},"summary":"List or search all dataservices","tags":["dataservices"]}}},"components":{"schemas":{"DataservicePage":{"properties":{"data":{"description":"The page data","items":{"$ref":"#/components/schemas/Dataservice (read)"},"type":"array"},"next_page":{"description":"The next page URL if exists","type":"string"},"page":{"description":"The current page","minimum":1,"type":"integer"},"page_size":{"description":"The page size used for pagination","minimum":0,"type":"integer"},"previous_page":{"description":"The previous page URL if exists","type":"string"},"total":{"description":"The total paginated items","minimum":0,"type":"integer"}},"required":["page","page_size","total"],"type":"object"},"Dataservice (read)":{"properties":{"access_audiences":{"items":{"$ref":"#/components/schemas/AccessAudience (read)"},"type":"array"},"access_type":{"enum":["open","open_with_account","restricted"],"type":"string"},"access_type_reason":{"type":"string"},"access_type_reason_category":{"enum":["confidentiality_of_proceedings_of_public_authorities","international_relations_public_security_or_national_defence","course_of_justice_or_fair_trial","confidentiality_of_commercial_or_industrial_information","intellectual_property_rights","confidentiality_of_personal_data","protection_of_voluntary_information_suppliers","protection_of_environment"],"type":"string"},"acronym":{"maxLength":128,"type":"string"},"archived_at":{"format":"date-time","type":"string"},"authorization_request_url":{"type":"string"},"availability":{"type":"number"},"availability_url":{"type":"string"},"badges":{"items":{"allOf":[{"$ref":"#/components/schemas/Badge (read)"}],"readOnly":true},"readOnly":true,"type":"array"},"base_api_url":{"type":"string"},"business_documentation_url":{"type":"string"},"contact_points":{"items":{"$ref":"#/components/schemas/ContactPoint (read)"},"type":"array"},"created_at":{"format":"date-time","readOnly":true,"type":"string"},"datasets":{"description":"Visit this API link to see the list.","type":"object"},"deleted_at":{"format":"date-time","type":"string"},"description":{"format":"markdown","type":"string"},"extras":{"type":"object"},"featured":{"readOnly":true,"type":"boolean"},"format":{"enum":["REST","WMS","WSL"],"type":"string"},"harvest":{"allOf":[{"$ref":"#/components/schemas/HarvestDataserviceMetadata (read)"}],"readOnly":true},"id":{"readOnly":true,"type":"string"},"license":{"description":"The ID of the license","type":"string"},"machine_documentation_url":{"description":"Swagger link, OpenAPI format, WMS XML…","type":"string"},"metadata_modified_at":{"format":"date-time","readOnly":true,"type":"string"},"metrics":{"readOnly":true,"type":"object"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"Only present if owner is not set. Can only be set to an organization of the current authenticated user."},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Only present if organization is not set. Can only be set to the current authenticated user."},"permissions":{"allOf":[{"$ref":"#/components/schemas/DataservicePermissions"}],"readOnly":true},"private":{"description":"Is the dataservice private to the owner or the organization","type":"boolean"},"rate_limiting":{"type":"string"},"rate_limiting_url":{"type":"string"},"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"slug":{"maxLength":255,"readOnly":true,"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"technical_documentation_url":{"description":"HTML version of a Swagger…","type":"string"},"title":{"type":"string"}},"required":["created_at","id","metadata_modified_at","slug","title"],"type":"object"},"AccessAudience (read)":{"properties":{"condition":{"enum":["yes","no","under_condition"],"type":"string"},"role":{"enum":["local_authority_and_administration","company_and_association","private"],"type":"string"}},"type":"object"},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"ContactPoint (read)":{"properties":{"contact_form":{"type":"string"},"email":{"maxLength":255,"type":"string"},"id":{"readOnly":true,"type":"string"},"name":{"maxLength":255,"type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"Only present if owner is not set. Can only be set to an organization of the current authenticated user."},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Only present if organization is not set. Can only be set to the current authenticated user."},"role":{"enum":["contact","creator","publisher","rightsHolder","custodian","distributor","originator","principalInvestigator","processor","resourceProvider","user"],"type":"string"}},"required":["id","role"],"type":"object"},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"maxLength":128,"type":"string"},"badges":{"items":{"allOf":[{"$ref":"#/components/schemas/Badge (read)"}],"readOnly":true},"readOnly":true,"type":"array"},"logo":{"description":"URL of the image","readOnly":true,"type":"string"},"logo_thumbnail":{"description":"URL of the cropped and squared image (100x100)","readOnly":true,"type":"string"},"name":{"type":"string"},"page":{"description":"Link to the udata web page for this organization","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"maxLength":255,"readOnly":true,"type":"string"},"uri":{"description":"Link to the API endpoint for this organization","readOnly":true,"type":"string"}},"required":["name","slug"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"URL of the image","readOnly":true,"type":"string"},"avatar_thumbnail":{"description":"URL of the cropped and squared image (500x500)","readOnly":true,"type":"string"},"deleted":{"description":"The date the account was deleted, null for a live account","format":"date-time","readOnly":true,"type":"string"},"first_name":{"maxLength":255,"type":"string"},"last_name":{"maxLength":255,"type":"string"},"page":{"description":"Link to the udata web page for this user","readOnly":true,"type":"string"},"slug":{"maxLength":255,"readOnly":true,"type":"string"},"uri":{"description":"Link to the API endpoint for this user","readOnly":true,"type":"string"}},"required":["first_name","last_name","slug"],"type":"object"}]},"HarvestDataserviceMetadata (read)":{"properties":{"archived_at":{"format":"date-time","type":"string"},"archived_reason":{"type":"string"},"backend":{"type":"string"},"created_at":{"description":"Date of creation as provided by the harvested catalog","format":"date-time","type":"string"},"domain":{"type":"string"},"issued_at":{"description":"Date of release as provided by the harvested catalog","format":"date-time","type":"string"},"last_update":{"description":"Date of last harvest","format":"date-time","type":"string"},"modified_at":{"description":"Date of last modification as provided by the harvested catalog","format":"date-time","type":"string"},"remote_id":{"type":"string"},"remote_url":{"type":"string"},"source_id":{"type":"string"},"source_url":{"type":"string"},"uri":{"description":"RDF node ID if it's an `URIRef`. `None` if it's not present or if it's a random auto-generated ID inside the graph.","type":"string"}},"type":"object"},"DataservicePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"}},"type":"object"}}}}
```

## POST /dataservices/{dataservice}/datasets/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/datasets/":{"post":{"operationId":"dataservice_datasets_create","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28read%29"}}}},"400":{"description":"Malformed object id(s) in request"},"403":{"description":"Forbidden"},"404":{"description":"Dataservice not found"},"410":{"description":"Dataservice has been deleted"}},"tags":["dataservices"],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataserviceDatasetsAdd"},"type":"array"}}},"required":true}}}},"components":{"schemas":{"DataserviceDatasetsAdd":{"properties":{"id":{"description":"Id of the dataset to add","type":"string"}},"required":["id"],"type":"object"}}}}
```

## GET /dataservices/{dataservice}/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/":{"get":{"operationId":"get_dataservice","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28read%29"}}}}},"tags":["dataservices"]}}},"components":{"schemas":{}}}
```

## GET /dataservices/{id}/followers/

> List all followers for a given object

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{id}/followers/":{"get":{"operationId":"list_dataservice_followers","parameters":[{"schema":{"type":"integer","default":1,"exclusiveMinimum":0},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20,"exclusiveMinimum":0},"description":"The page size to fetch","in":"query","name":"page_size"},{"schema":{"type":"string"},"description":"Filter follower by user, it allows to check if a user is following the object","in":"query","name":"user"},{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowPage"}}}}},"summary":"List all followers for a given object","tags":["dataservices"]}}},"components":{"schemas":{"FollowPage":{"properties":{"data":{"description":"The page data","items":{"$ref":"#/components/schemas/Follow (read)"},"type":"array"},"next_page":{"description":"The next page URL if exists","type":"string"},"page":{"description":"The current page","minimum":1,"type":"integer"},"page_size":{"description":"The page size used for pagination","minimum":0,"type":"integer"},"previous_page":{"description":"The previous page URL if exists","type":"string"},"total":{"description":"The total paginated items","minimum":0,"type":"integer"}},"required":["page","page_size","total"],"type":"object"},"Follow (read)":{"properties":{"follower":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The follower","readOnly":true},"id":{"readOnly":true,"type":"string"},"since":{"description":"The date from which the user started following","format":"date-time","readOnly":true,"type":"string"}},"required":["follower","id","since"],"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"URL of the image","readOnly":true,"type":"string"},"avatar_thumbnail":{"description":"URL of the cropped and squared image (500x500)","readOnly":true,"type":"string"},"deleted":{"description":"The date the account was deleted, null for a live account","format":"date-time","readOnly":true,"type":"string"},"first_name":{"maxLength":255,"type":"string"},"last_name":{"maxLength":255,"type":"string"},"page":{"description":"Link to the udata web page for this user","readOnly":true,"type":"string"},"slug":{"maxLength":255,"readOnly":true,"type":"string"},"uri":{"description":"Link to the API endpoint for this user","readOnly":true,"type":"string"}},"required":["first_name","last_name","slug"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"}}}}
```

## POST /dataservices/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/":{"post":{"operationId":"create_dataservice","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28read%29"}}}},"400":{"description":"Validation error"}},"tags":["dataservices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28write%29"}}},"required":true}}}},"components":{"schemas":{}}}
```

## DELETE /dataservices/{dataservice}/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/":{"delete":{"operationId":"delete_dataservice","parameters":[{"schema":{"type":"boolean","default":false},"description":"Send formal legal notice with appeal information to owner (admin only)","in":"query","name":"send_legal_notice"}],"responses":{"204":{"description":"dataservice deleted"}},"tags":["dataservices"]}}}}
```

## PATCH /dataservices/{dataservice}/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/":{"patch":{"operationId":"update_dataservice","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28read%29"}}}},"400":{"description":"Validation error"}},"tags":["dataservices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28write%29"}}},"required":true}}}},"components":{"schemas":{}}}
```

## DELETE /dataservices/{dataservice}/datasets/{dataset}/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/datasets/{dataset}/":{"delete":{"operationId":"delete_dataservice_dataset_api_/dataservices/<dataservice:dataservice>/datasets/<dataset:dataset>/","responses":{"404":{"description":"Dataservice not found"}},"tags":["dataservices"]}}}}
```

## Follow an object given its ID

> Returns the number of followers left after the operation

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{id}/followers/":{"post":{"description":"Returns the number of followers left after the operation","operationId":"follow_dataservice","responses":{"200":{"description":"Success"}},"summary":"Follow an object given its ID","tags":["dataservices"]}}}}
```

## DELETE /dataservices/{dataservice}/featured/

> Unmark a dataservice as featured

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{dataservice}/featured/":{"delete":{"operationId":"unfeature_dataservice","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataservice%20%28read%29"}}}}},"summary":"Unmark a dataservice as featured","tags":["dataservices"]}}},"components":{"schemas":{}}}
```

## Unfollow an object given its ID

> Returns the number of followers left after the operation

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Dataservices related operations (beta)","name":"dataservices"}],"servers":[{"url":"https://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{id}/followers/":{"delete":{"description":"Returns the number of followers left after the operation","operationId":"unfollow_dataservice","responses":{"200":{"description":"Success"}},"summary":"Unfollow an object given its ID","tags":["dataservices"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guides.data.gouv.fr/api-de-data.gouv.fr/reference/dataservices.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
