Create a custom map layer

post

/rest/ofscMetadata/v1/mapLayers

This operation creates a custom map layer.

Request

Body ()
The custom map layer object that needs to be created.
Root Schema : MapLayers
Type: object
Title: MapLayers
Show Source
  • Title: Label
    Minimum Length: 1
    Maximum Length: 24
    Pattern: ^[A-Za-z0-9_]+$
    The unique identifier of the custom map layer.
  • Plugin or form map layer hint button
    Title: Plugin or form map layer hint button
    The object representing selected Custom Form or Plugin will be displayed as a button on layer hint. Parameters specified in Plugin/Form Field will be sent to the selected Custom Form or Plugin.
  • List of Shape Hint Columns
    Title: List of Shape Hint Columns
  • Title: Shape Title Column
    The name of the column that is selected as the title. This field is returned only if the property is set for the custom map layer.
  • Title: Source Name
    Minimum Length: 1
    Maximum Length: 255
    The name of the external source of the custom map layers. This field is not applicable for the internal custom map layers.
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the custom map layers. The status can be set to either 'active' or 'inactive'.
  • List of Table Columns
    Title: List of Table Columns
  • Title: Text
    The name of the custom map layer in the user's language. This field is returned only by using the GET operation and it is ignored in a PUT or POST operation.
  • Title: Theme
    Minimum Length: 1
    Maximum Length: 255
    The theme name of the external custom map layers. This field is not applicable for the internal custom map layers.
  • Translations
    Title: Translations
    The translations of all the custom map layers. This field is required in a PUT or POST operation. The translation of the 'text' parameter is required for the default language.
  • Title: Type
    Allowed Values: [ "internal", "external" ]

    The type of the custom map layer. The value can be set to either 'external' or 'internal'.

    • If the value is set to 'external', then the geo data is imported from external source.
    • If the value is set to 'internal', then the geo data is in the Oracle Field Service MapViewer, and it need not be imported.
  • Title: URL
    Minimum Length: 1
    Maximum Length: 1024
    The URL for the external custom map layers. This field is not applicable for the internal custom map layers.
Nested Schema : Plugin or form map layer hint button
Type: object
Title: Plugin or form map layer hint button
The object representing selected Custom Form or Plugin will be displayed as a button on layer hint. Parameters specified in Plugin/Form Field will be sent to the selected Custom Form or Plugin.
Show Source
  • Title: PluginForm Type
    Allowed Values: [ "plugin", "form" ]
    The type of plugin or form the activity hint button on map layer.
  • Title: Label for plugin or form
    Minimum Length: 1
    Maximum Length: 64
    The label plugin or form for map layer hint.
Nested Schema : List of Shape Hint Columns
Type: array
Title: List of Shape Hint Columns
Show Source
Nested Schema : List of Table Columns
Type: array
Title: List of Table Columns
Show Source
Nested Schema : Translations
Type: array
Title: Translations
The translations of all the custom map layers. This field is required in a PUT or POST operation. The translation of the 'text' parameter is required for the default language.
Show Source
Nested Schema : Shape Hint Column
Type: object
Title: Shape Hint Column
Show Source
Nested Schema : Translation
Type: object
Show Source
  • This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
  • This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)
Back to Top

Response

Supported Media Types

201 Response

This section describes the 201 status response for this operation. This response code indicates that the custom map layer object is created. The custom map layer object is returned in the response.
Body ()
Root Schema : MapLayers
Type: object
Title: MapLayers
Show Source
  • Title: Label
    Minimum Length: 1
    Maximum Length: 24
    Pattern: ^[A-Za-z0-9_]+$
    The unique identifier of the custom map layer.
  • Plugin or form map layer hint button
    Title: Plugin or form map layer hint button
    The object representing selected Custom Form or Plugin will be displayed as a button on layer hint. Parameters specified in Plugin/Form Field will be sent to the selected Custom Form or Plugin.
  • List of Shape Hint Columns
    Title: List of Shape Hint Columns
  • Title: Shape Title Column
    The name of the column that is selected as the title. This field is returned only if the property is set for the custom map layer.
  • Title: Source Name
    Minimum Length: 1
    Maximum Length: 255
    The name of the external source of the custom map layers. This field is not applicable for the internal custom map layers.
  • Title: Status
    Allowed Values: [ "active", "inactive" ]
    The status of the custom map layers. The status can be set to either 'active' or 'inactive'.
  • List of Table Columns
    Title: List of Table Columns
  • Title: Text
    The name of the custom map layer in the user's language. This field is returned only by using the GET operation and it is ignored in a PUT or POST operation.
  • Title: Theme
    Minimum Length: 1
    Maximum Length: 255
    The theme name of the external custom map layers. This field is not applicable for the internal custom map layers.
  • Translations
    Title: Translations
    The translations of all the custom map layers. This field is required in a PUT or POST operation. The translation of the 'text' parameter is required for the default language.
  • Title: Type
    Allowed Values: [ "internal", "external" ]

    The type of the custom map layer. The value can be set to either 'external' or 'internal'.

    • If the value is set to 'external', then the geo data is imported from external source.
    • If the value is set to 'internal', then the geo data is in the Oracle Field Service MapViewer, and it need not be imported.
  • Title: URL
    Minimum Length: 1
    Maximum Length: 1024
    The URL for the external custom map layers. This field is not applicable for the internal custom map layers.
Nested Schema : Plugin or form map layer hint button
Type: object
Title: Plugin or form map layer hint button
The object representing selected Custom Form or Plugin will be displayed as a button on layer hint. Parameters specified in Plugin/Form Field will be sent to the selected Custom Form or Plugin.
Show Source
  • Title: PluginForm Type
    Allowed Values: [ "plugin", "form" ]
    The type of plugin or form the activity hint button on map layer.
  • Title: Label for plugin or form
    Minimum Length: 1
    Maximum Length: 64
    The label plugin or form for map layer hint.
Nested Schema : List of Shape Hint Columns
Type: array
Title: List of Shape Hint Columns
Show Source
Nested Schema : List of Table Columns
Type: array
Title: List of Table Columns
Show Source
Nested Schema : Translations
Type: array
Title: Translations
The translations of all the custom map layers. This field is required in a PUT or POST operation. The translation of the 'text' parameter is required for the default language.
Show Source
Nested Schema : Shape Hint Column
Type: object
Title: Shape Hint Column
Show Source
Nested Schema : Translation
Type: object
Show Source
  • This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
  • This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

The following example shows how to create a map layer by submitting a POST request on the REST resource using cURL.

Example of Request Header

The following shows an example of the request header.

POST /rest/ofscMetadata/v1/mapLayers HTTP/1.0

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
  "label": "somelb1",           
  "type": "external",           
  "status": "active",           
  "sourceName": "someSourceName",   
  "theme": "someTheme",         
  "url": "https://hello.com",    
  "translations": [             
    {
      "language": "en",
      "name": "Some Name"
    },
    {
      "language": "es",
      "name": "Un Nombre"
    }
  ]
}

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 201 Created

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "label": "somelb1",         
    "type": "external",         
    "status": "active",         
    "sourceName": "someSourceName", 
    "theme": "someTheme",       
    "url": "https://hello.com",  
    "text": "Some Name",        
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/mapLayers/somelb1"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/mapLayers"
        }
    ]
}
Back to Top