API v2 - REST¶
OpenAPI 3.0 Schema
-
GET
/api/v2/
¶ Returns a list of available endpoints
- Status Codes
200 OK – A json with a list of available endpoints
-
GET
/api/v2/documents/
¶ API endpoint that return all the documents available with detailed information (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/documents/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
DELETE
/api/v2/documents/
¶ Either delete a single or many model instances in bulk, by sending a json with the ID of the document to delete
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/documents/{id}/
¶ API endpoint that return detailed information of a specific document.
- Parameters
id (integer) – A unique integer value identifying this document.
- Status Codes
200 OK –
-
PUT
/api/v2/documents/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this document.
- Status Codes
200 OK –
-
PATCH
/api/v2/documents/{id}/
¶ API endpoint that allows documents to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this document.
- Status Codes
200 OK –
-
DELETE
/api/v2/documents/{id}/
¶ Delete a single document.
- Parameters
id (integer) – A unique integer value identifying this document.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/documents/{id}/linked_resources/
¶ API endpoint that return all the linked resources of a specific id.
- Parameters
id (integer) – A unique integer value identifying this document.
- Status Codes
200 OK –
-
GET
/api/v2/geoapps/
¶ API endpoint that show all the geoapps available.
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/geoapps/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/geoapps/
¶ API endpoint that allows geoapps to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/geoapps/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/geoapps/{id}/
¶ API endpoint that show details of a specific geoapp.
- Parameters
id (integer) – A unique integer value identifying this geo app.
- Status Codes
200 OK –
-
PUT
/api/v2/geoapps/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this geo app.
- Status Codes
200 OK –
-
PATCH
/api/v2/geoapps/{id}/
¶ API endpoint that allows geoapps to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this geo app.
- Status Codes
200 OK –
-
DELETE
/api/v2/geoapps/{id}/
¶ Delete a single instances
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Parameters
id (integer) – A unique integer value identifying this geo app.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/geoapps/{id}/{field_name}/
¶ Fetch related object(s), as if sideloaded (used to support link objects).
This method gets mapped to /<resource>/<pk>/<field_name>/ by DynamicRouter for all DynamicRelationField fields. Generally, this method probably shouldn’t be overridden.
An alternative implementation would be to generate reverse queries. For an exploration of that approach, see:
- Parameters
field_name (string) –
id (integer) – A unique integer value identifying this geo app.
- Status Codes
200 OK –
-
GET
/api/v2/geostories/
¶ API endpoint that return all the geostories available with detailed information (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/geostories/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/geostories/
¶ API endpoint that allows geoapps to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/geostories/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/geostories/{id}/
¶ API endpoint that return detailed information of a specific geostory.
- Parameters
id (integer) – A unique integer value identifying this geo story.
- Status Codes
200 OK –
-
PUT
/api/v2/geostories/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this geo story.
- Status Codes
200 OK –
-
PATCH
/api/v2/geostories/{id}/
¶ API endpoint that allows geoapps to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this geo story.
- Status Codes
200 OK –
-
DELETE
/api/v2/geostories/{id}/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Parameters
id (integer) – A unique integer value identifying this geo story.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/geostories/{id}/{field_name}/
¶ Fetch related object(s), as if sideloaded (used to support link objects).
This method gets mapped to /<resource>/<pk>/<field_name>/ by DynamicRouter for all DynamicRelationField fields. Generally, this method probably shouldn’t be overridden.
An alternative implementation would be to generate reverse queries. For an exploration of that approach, see:
- Parameters
field_name (string) –
id (integer) – A unique integer value identifying this geo story.
- Status Codes
200 OK –
-
GET
/api/v2/groups/
¶ API endpoint that return all groups available with detailed information (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes
200 OK –
-
POST
/api/v2/groups/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/groups/
¶ API endpoint that allows gropus to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/groups/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/groups/{id}/
¶ API endpoint that return detailed information of a specific group.
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
PUT
/api/v2/groups/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
PATCH
/api/v2/groups/{id}/
¶ API endpoint that allows gropus to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
DELETE
/api/v2/groups/{id}/
¶ Delete a single instance
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/groups/{id}/managers/
¶ API endpoint that show the managers for the selected group.
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
GET
/api/v2/groups/{id}/members/
¶ API endpoint that show either members and managers for the selected group.
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
GET
/api/v2/groups/{id}/resources/
¶ API endpoint that show all the resources connected to the selected group.
- Parameters
id (integer) – A unique integer value identifying this group profile.
- Status Codes
200 OK –
-
GET
/api/v2/layers/
¶ API endpoint that return all the layers available with detailed information (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/layers/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/layers/
¶ API endpoint that allows layers to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/layers/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/layers/{id}/
¶ API endpoint that return detailed information of a specific layer
- Parameters
id (integer) – A unique integer value identifying this layer.
- Status Codes
200 OK –
-
PUT
/api/v2/layers/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this layer.
- Status Codes
200 OK –
-
PATCH
/api/v2/layers/{id}/
¶ API endpoint that allows layers to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this layer.
- Status Codes
200 OK –
-
DELETE
/api/v2/layers/{id}/
¶ Delete a single model instance
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Parameters
id (integer) – A unique integer value identifying this layer.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/layers/{id}/{field_name}/
¶ Fetch related object(s), as if sideloaded (used to support link objects).
This method gets mapped to /<resource>/<pk>/<field_name>/ by DynamicRouter for all DynamicRelationField fields. Generally, this method probably shouldn’t be overridden.
An alternative implementation would be to generate reverse queries. For an exploration of that approach, see:
- Parameters
field_name (string) –
id (integer) – A unique integer value identifying this layer.
- Status Codes
200 OK –
-
GET
/api/v2/maps/
¶ API endpoint that return all the maps available with detailed information (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/maps/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
DELETE
/api/v2/maps/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/maps/{id}/
¶ API endpoint that return detailed information of a specific map.
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
200 OK –
-
PUT
/api/v2/maps/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
200 OK –
-
PATCH
/api/v2/maps/{id}/
¶ API endpoint that allows maps to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
200 OK –
-
DELETE
/api/v2/maps/{id}/
¶ Delete a single instance.
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/maps/{id}/layers/
¶ Return the list of the layer that compose the map with some information like opacity, name, visibility. In the layer_params field, are available the information regarding the layer
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
200 OK –
-
GET
/api/v2/maps/{id}/local_layers/
¶ API endpoint allowing to retrieve a detailed list of the local MapLayers
- Parameters
id (integer) – A unique integer value identifying this map.
- Status Codes
200 OK –
-
GET
/api/v2/resources/
¶ API endpoint that show all resources available in GeoNode, includes maps, layers, geostories and documents (paginated).
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/resources/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/resources/
¶ API endpoint that allows base resources to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/resources/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/resources/{id}/
¶ API endpoint that return detailed information of a specific resource, including keywods, owner and bbox_polygon.
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
200 OK –
-
PUT
/api/v2/resources/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
200 OK –
-
PATCH
/api/v2/resources/{id}/
¶ API endpoint that allows base resources to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
200 OK –
-
DELETE
/api/v2/resources/{id}/
¶ Delete a single instance
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/resources/{id}/get_perms/
¶ API endpoint that show all the permissions defined for a specific resource, splitted by groups and users.
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
200 OK –
-
PUT
/api/v2/resources/{id}/set_perms/
¶ API endpoint that allows the user to set the permissions to a specific resource.
- Parameters
id (integer) – A unique integer value identifying this resource base.
- Status Codes
200 OK –
-
GET
/api/v2/resources/approved/
¶ Will return a list of approved resource available.
- Status Codes
200 OK –
-
GET
/api/v2/resources/featured/
¶ Will return a list of featured resource available.
- Status Codes
200 OK –
-
GET
/api/v2/resources/published/
¶ Will return a list of published resource available.
- Status Codes
200 OK –
-
GET
/api/v2/resources/resource_types/
¶ Will return a list of the resource types that are managed by GeoNode.
- Status Codes
200 OK –
-
GET
/api/v2/schema/
¶ OpenApi3 schema for this API. Format can be selected via content negotiation.
YAML: application/vnd.oai.openapi
JSON: application/vnd.oai.openapi+json
- Query Parameters
format (string) –
lang (string) –
- Status Codes
200 OK –
-
GET
/api/v2/uploads/
¶ List of the upload instances with their status.
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes
200 OK –
-
POST
/api/v2/uploads/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
PATCH
/api/v2/uploads/
¶ API endpoint that allows uploads to be viewed or edited.
- Status Codes
200 OK –
-
DELETE
/api/v2/uploads/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/uploads/{id}/
¶ Authenticated API endpoint that will show details about the upload status. Main informations available are:
ID: upload id
name: layer name
date: start date of the import process
state: the actual state of the import process. When the state is PROCESSED, means that the layer has been process by GeoNode and Geoserver
progress: % of progress
uploadfile_set: list of the uploaded files
delete url: url to be called for delete the import
import_url: to monitoring the import status in geoserver.
- Example of still in progress import:
- {
- “upload”: {
“id”: 1119, “name”: “layer_name”, “date”: “2021-04-26T09:50:41.233543Z”, “create_date”: “2021-04-26T09:50:40.515866Z”, “user”: 1167, “state”: “COMPLETE”, “progress”: 80.0, “complete”: true, “import_id”: 1089, “uploadfile_set”: [], “resume_url”: null, “delete_url”: “/upload/delete/1119”, “import_url”: “http://geoserver:8080/geoserver/rest/imports/1089”, “detail_url”: null
}
}
- Parameters
id (integer) – A unique integer value identifying this upload.
- Status Codes
200 OK –
-
PUT
/api/v2/uploads/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this upload.
- Status Codes
200 OK –
-
PATCH
/api/v2/uploads/{id}/
¶ API endpoint that allows uploads to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this upload.
- Status Codes
200 OK –
-
DELETE
/api/v2/uploads/{id}/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Parameters
id (integer) – A unique integer value identifying this upload.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/uploads/{id}/{field_name}/
¶ Fetch related object(s), as if sideloaded (used to support link objects).
This method gets mapped to /<resource>/<pk>/<field_name>/ by DynamicRouter for all DynamicRelationField fields. Generally, this method probably shouldn’t be overridden.
An alternative implementation would be to generate reverse queries. For an exploration of that approach, see:
- Parameters
field_name (string) –
id (integer) – A unique integer value identifying this upload.
- Status Codes
200 OK –
-
PUT
/api/v2/uploads/upload/
¶ API endpoint that allows user to upload new layers into GeoNode. The endpoint is protected via authentication and the request should always come from the same session. The API accept the request with form-data. Is also possible to define some information via json. Behind the scene, geonode will:
Create an upload session
Save the layer into GeoNode
Call async geoserver to save the layer
- Example:
client = requests.session() response = client.put(
“http://localhost:8000/api/v2/uploads/upload/”, auth=HTTPBasicAuth(username, password), data=params, files=files,
) Where:
- params = {
“permissions”: ‘{ “users”: {“AnonymousUser”: [“view_resourcebase”]} , “groups”:{}}’, # layer permissions “time”: “false”, “layer_title”: “layer_title”, “time”: “false”, “charset”: “UTF-8”,
} files = {
“filename”: <_io.BufferedReader name=”filename”>
}
- Status Codes
-
PUT
/upload/final?id={import_id}
¶ API endpoint that allows user to check the status of new layers into GeoNode. The endpoint is protected via authentication and the request should always come from the same session. Example:
client = requests.session() response = client.get(”http://localhost:8000/upload/final?id=1”) Where:
- params = {
“permissions”: ‘{ “users”: {“AnonymousUser”: [“view_resourcebase”]} , “groups”:{}}’, # layer permissions “time”: “false”, “layer_title”: “layer_title”, “time”: “false”, “charset”: “UTF-8”,
}
- Status Codes
200 OK –
- {
“status”: “finished”, “id”: 131, “url”: “file_name_path”, “bbox”: “-180.0000000,-90.0000000,180.0000000,90.0000000”, “crs”: {
”type”: “name”, “properties”: “EPSG:4326”
}, “success”: true
}
-
GET
/api/v2/users/
¶ API endpoint that show the list of users registered in GeoNode. if the logged user is the administrator will show all the user available, otherwise only the information of his own account are provided
- Query Parameters
ordering (string) – Which field to use when ordering the results.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes
200 OK –
-
POST
/api/v2/users/
¶ Either create a single or many model instances in bulk using the Serializer’s many=True ability from Django REST >= 2.2.5.
The data can be represented by the serializer name (single or plural forms), dict or list.
Examples:
POST /dogs/ {
“name”: “Fido”, “age”: 2
}
POST /dogs/ {
- “dog”: {
“name”: “Lucky”, “age”: 3
}
}
POST /dogs/ {
- “dogs”: [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
}
POST /dogs/ [
{“name”: “Fido”, “age”: 2}, {“name”: “Lucky”, “age”: 3}
]
- Status Codes
-
DELETE
/api/v2/users/
¶ Either delete a single or many model instances in bulk
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Status Codes
204 No Content – No response body
-
GET
/api/v2/users/{id}/
¶ API endpoint that return detailed information of a specific user.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
PUT
/api/v2/users/{id}/
¶ Update one or more model instances.
If ENABLE_BULK_UPDATE is set, multiple previously-fetched records may be updated in a single call, provided their IDs.
If ENABLE_PATCH_ALL is set, multiple records may be updated in a single PATCH call, even without knowing their IDs.
WARNING: ENABLE_PATCH_ALL should be considered an advanced feature and used with caution. This feature must be enabled at the viewset level and must also be requested explicitly by the client via the “patch-all” query parameter.
This parameter can have one of the following values:
- true (or 1): records will be fetched and then updated in a transaction loop
The Model.save method will be called and model signals will run
This can be slow if there are too many signals or many records in the query
This is considered the more safe and default behavior
- query: records will be updated in a single query
The QuerySet.update method will be called and model signals will not run
This will be fast, but may break data constraints that are controlled by signals
This is considered unsafe but useful in certain situations
The server’s successful response to a patch-all request will NOT include any individual records. Instead, the response content will contain a “meta” object with an “updated” count of updated records.
Examples:
Update one dog:
PATCH /dogs/1/ {
‘fur’: ‘white’
}
Update many dogs by ID:
PATCH /dogs/ [
{‘id’: 1, ‘fur’: ‘white’}, {‘id’: 2, ‘fur’: ‘black’}, {‘id’: 3, ‘fur’: ‘yellow’}
]
Update all dogs in a query:
PATCH /dogs/?filter{fur.contains}=brown&patch-all=true {
‘fur’: ‘gold’
}
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
DELETE
/api/v2/users/{id}/
¶ Delete a model instance.
DELETE /dogs/ {
- “dogs”: [
{“id”: 1}, {“id”: 2}
]
}
DELETE /dogs/ [
{“id”: 1}, {“id”: 2}
]
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
204 No Content – No response body
-
GET
/api/v2/users/{id}/groups/
¶ API endpoint that show the list of the groups that the user belong to.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
GET
/api/v2/users/{id}/resources/
¶ API endpoint that show the list of the resources that belong to the user.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
GET
/mapstore/rest/resources/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Status Codes
200 OK – No response body
-
POST
/mapstore/rest/resources/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Status Codes
201 Created – No response body
-
GET
/mapstore/rest/resources/{id}/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Parameters
id (integer) – A unique value identifying this map store resource.
- Status Codes
200 OK – No response body
-
PUT
/mapstore/rest/resources/{id}/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Parameters
id (integer) – A unique value identifying this map store resource.
- Status Codes
200 OK – No response body
-
PATCH
/mapstore/rest/resources/{id}/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Parameters
id (integer) – A unique value identifying this map store resource.
- Status Codes
200 OK – No response body
-
DELETE
/mapstore/rest/resources/{id}/
¶ Only Authenticate User perform CRUD Operations on Respective Data
- Parameters
id (integer) – A unique value identifying this map store resource.
- Status Codes
204 No Content – No response body
-
GET
/mapstore/rest/users/
¶ API endpoint that show the users available with some details.
- Status Codes
200 OK –
-
POST
/mapstore/rest/users/
¶ API endpoint that allows users to be viewed or edited.
- Status Codes
-
GET
/mapstore/rest/users/{id}/
¶ API endpoint that show the users available with some details.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
PUT
/mapstore/rest/users/{id}/
¶ API endpoint that allows users to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
200 OK –
-
DELETE
/mapstore/rest/users/{id}/
¶ API endpoint that allows users to be viewed or edited.
- Parameters
id (integer) – A unique integer value identifying this user.
- Status Codes
204 No Content – No response body