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
object
Populating Shapes Request
-
authentication(required):
object Authentication
Title:
Authentication
The authentication parameters used to connect with the server. -
shapeAreaColumn:
string
Title:
Shape Area Column
The name of the non-spatial column that contains the area of the shape. -
shapeIdentifierColumn(required):
string
Title:
Shape Identifier Column
The name of the non-spatial column that contains the identifier of the shape. -
SRID(required):
integer
Title:
SRID
The spatial reference identifier (SRID) of the geo-data in the shape file. -
URL(required):
string
Title:
URL
The link to the downloaded shapefile. Supported protocols: HTTPS only.
object
Authentication
-
password:
string
Title:
Password
The password of the user. -
type(required):
string
Title:
Type
Allowed Values:[ "basic", "ftp", "none" ]
The type of the authentication. -
username:
string
Title:
Username
The username of the user.
Response
- application/schema+json
- application/json
200 Response
object
Shape Upload
-
downloadId:
integer
Title:
Download ID
The unique identifier of the shapefile download process. -
status:
string
Title:
Status
The status of the shapefile upload process. -
time:
string
Title:
Time
The 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" }