- URL:
- https://[root]/portals/[portalID]/datastores/allDatasets/getLayers
- Methods:
GET
- Version Introduced:
- 10.7.1
Example usage
The following is a sample ArcGIS Enterprise POST request for the get
operation:
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/getLayers HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
datastoreId=55d87f404a7e420bb969ccb70254bfec&f=pjson
Description
The get
operation returns a list of layers bulk published from a data store with the Publish Layers operation. The get
operation returns an array of tuples, with each tuple containing two objects: a layer and the dataset it was published from. For example, the feature layer CITIES
was published from the feature class CITIES
.
Request parameters
Parameter | Details |
---|---|
(Required) | The Example
|
| The response format. The default format is Value: |
JSON Response examples
If successful, get
will return the layer information for the data store. The dataset
object's type
property can return either of the following values: table
, feature
, or relationship
.
{
"layerAndDatasets": [
{
"layer": {
"id": "1a1dbdf5b5a044fcbbe7ee5af5e9f807",
"title": "CITIES",
"created": 1543962040410,
"modified": 1543962043256,
"url": "https://webadaptor.domain.com/server/rest/services/TestFolder/Name/FeatureServer",
"type": "Feature Service"
},
"dataset": {
"name": "SDE.CITIES",
"displayName": "CITIES",
"type": "featureClass",
"datastoreId": "42d41b6663c14e8699dc630ccaf87ca6",
"path": "/SDE.CITIES"
}
},
{
"layer": {
"id": "26b8a8ad6618408da1761edfc6ab2fad",
"title": "StreetsFew",
"created": 1543962072225,
"modified": 1543962081239,
"url": "https://webadaptor.domain.com/server/rest/services/TestFolder/Name/MapServer",
"type": "Map Service"
},
"dataset": {
"name": "SDE.StreetsFew",
"displayName": "StreetsFew",
"type": "featureClass",
"datastoreId": "42d41b6663c14e8699dc630ccaf87ca6",
"path": "/SDE.RedlandsFewFeats/SDE.StreetsFew"
}
}
]
}
If the operation fails, get
will return an error similar to the message below:
{
{
"error": {
"code": <code>,
"messageCode": <a message code>,
"message": <a reason>,
"details": []
}
}
}