Start shape upload
/rest/ofscMetadata/v1/workZones/custom-actions/populateShapes
All the shapefile must be uploaded in a single request. Every time a shapefile is uploaded, the existing shapefile is removed. Therefore, uploading shapefiles in an incremental order is not supported. For more information on uploading shapefiles, see Configuring a Custom Map Layer by Using the Metadata API.
Note: From version 16.8.3 onwards, when the workzone shapefiles are uploaded, Oracle Field Service performs several validations to rectify the data imported from non-Oracle applications. If the shapefile is already uploaded, then it is recommended that you upload the shapefiles again to ensure that there are no issues in the existing data.
Request
objectPopulating Shapes Request-
authentication(required):
object Authentication
Title:
AuthenticationThe authentication parameters used to connect with the server. -
shapeAreaColumn:
string
Title:
Shape Area ColumnThe name of the non-spatial column that contains the area of the shape. -
shapeIdentifierColumn(required):
string
Title:
Shape Identifier ColumnThe name of the non-spatial column that contains the identifier of the shape. -
SRID(required):
integer
Title:
SRIDThe spatial reference identifier (SRID) of the geo-data in the shape file. -
URL(required):
string
Title:
URLThe link to the downloaded shapefile. Supported protocols: HTTPS only.
objectAuthentication-
password:
string
Title:
PasswordThe password of the user. -
type(required):
string
Title:
TypeAllowed Values:[ "basic", "ftp", "none" ]The type of the authentication. -
username:
string
Title:
UsernameThe username of the user.
Response
- application/schema+json
- application/json
200 Response
objectShape Upload-
downloadId:
integer
Title:
Download IDThe unique identifier of the shapefile download process. -
status:
string
Title:
StatusThe status of the shapefile upload process. -
time:
string
Title:
TimeThe current time.
Default Response
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to add populate shapes by submitting a POST request on the REST resource using cURL.
curl -X
POST -H "Authorization: Basic c29hcEBtYXN0ZXI6MQ=="
-H "Cache-Control: no-cache" -H "Postman-Token: 34f414c3-23cf-dc98-ed57-614010f1475e" -d '
{
"URL": "https://www2.census.gov/geo/tiger/GENZ2014/shp/cb_2014_us_zcta510_500k.zip",
"authentication":
{
"type": "none",
"username": "user",
"password": "pass"
},
"shapeIdentifierColumn": "GEOID10",
"shapeAreaColumn": "shapegeo"
}
' "https://ofsc1.vm/master/wwwroot/rest/ofscMetadata/v1/workZones/custom-actions/populateShapes?request_auth_basic&pretty"
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 Ok Server: nginx/1.6.2 Date: Fri, 24 Jul 2015 08:35:48 GMT Content-Type: application/json; charset=utf-8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"status": "pending",
"time": "2016-01-05 12:58:54",
"downloadId": "16ebd53f733cde76deecae12c11db86f"
}