# dataservices

## 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":"http://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/":{"get":{"operationId":"list_dataservices","parameters":[{"schema":{"type":"integer","default":1},"description":"The page to display","in":"query","name":"page"},{"schema":{"type":"integer","default":20},"description":"The page size","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"},"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":"string"},"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":{"maximum":100,"minimum":0,"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/HarvestMetadata (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","name","role"],"type":"object"},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"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":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestMetadata (read)":{"properties":{"archived_at":{"format":"date-time","type":"string"},"archived_reason":{"type":"string"},"backend":{"type":"string"},"created_at":{"description":"Date of the creation as provided by the harvested catalog","format":"date-time","type":"string"},"domain":{"type":"string"},"issued_at":{"description":"Release date as provided by the harvested catalog","format":"date-time","type":"string"},"last_update":{"description":"Date of the last harvesting","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":"http://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":"http://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":"http://www.data.gouv.fr/api/1"}],"paths":{"/dataservices/{id}/followers/":{"get":{"operationId":"list_dataservice_followers","parameters":[{"schema":{"type":"integer","default":1},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20},"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"},"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":{"properties":{"follower":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The follower","readOnly":true},"id":{"description":"The follow object technical ID","readOnly":true,"type":"string"},"since":{"description":"The date from which the user started following","format":"date-time","readOnly":true,"type":"string"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"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":"http://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":"http://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":"http://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":"http://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":"http://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":"http://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":"http://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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
