Create or replace an activity type group
put
/rest/ofscMetadata/v1/activityTypeGroups/{label}
This operation creates an activity type group resource or updates an existing one.
If the 'translation' parameter is not available for the update, then the translations are not changed; else all the translations are replaced by the structure from the request. The translations that are sent as entity fields are ignored.
Request
Path Parameters
-
label(required): string
Minimum Length:
1
Maximum Length:40
The label of the activity type group.
This section describes the request body parameters for this operation.
Root Schema : Activity Type Group
Type:
object
Title:
Activity Type Group
The object representing group activity types.
Show Source
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:32
The label of the activity type group. -
translations:
array Translations
Title:
Translations
The array of translation objects associated with the activity type group.
Nested Schema : Translations
Type:
array
Title:
Translations
The array of translation objects associated with the activity type group.
Show Source
Nested Schema : Translation
Type:
Show Source
object
-
language(required):
string
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.
-
languageISO:
string
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)
-
name(required):
string
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation. This code is returned when an activity type group object is updated.
Root Schema : ActivityTypeGroup
Type:
Show Source
object
-
activityTypes:
array Activity Types
Title:
Activity Types
The array of activity type objects associated with the activity type group.
Match All
Show Source
-
object
Activity Type Group
Title:
Activity Type Group
The object representing group activity types.
Nested Schema : Activity Types
Type:
array
Title:
Activity Types
The array of activity type objects associated with the activity type group.
Show Source
Nested Schema : Activity Type Group
Type:
object
Title:
Activity Type Group
The object representing group activity types.
Show Source
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:32
The label of the activity type group. -
translations:
array Translations
Title:
Translations
The array of translation objects associated with the activity type group.
Nested Schema : items
Type:
Show Source
object
-
label(required):
string
The label of the activity type object.
Nested Schema : Translations
Type:
array
Title:
Translations
The array of translation objects associated with the activity type group.
Show Source
Nested Schema : Translation
Type:
Show Source
object
-
language(required):
string
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.
-
languageISO:
string
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)
-
name(required):
string
201 Response
This section describes the 201 status response for this operation. This code is returned when an activity type group object is created.
Root Schema : ActivityTypeGroup
Type:
Show Source
object
-
activityTypes:
array Activity Types
Title:
Activity Types
The array of activity type objects associated with the activity type group.
Match All
Show Source
-
object
Activity Type Group
Title:
Activity Type Group
The object representing group activity types.
Nested Schema : Activity Types
Type:
array
Title:
Activity Types
The array of activity type objects associated with the activity type group.
Show Source
Nested Schema : Activity Type Group
Type:
object
Title:
Activity Type Group
The object representing group activity types.
Show Source
-
label:
string
Title:
Label
Minimum Length:1
Maximum Length:32
The label of the activity type group. -
translations:
array Translations
Title:
Translations
The array of translation objects associated with the activity type group.
Nested Schema : items
Type:
Show Source
object
-
label(required):
string
The label of the activity type object.
Nested Schema : Translations
Type:
array
Title:
Translations
The array of translation objects associated with the activity type group.
Show Source
Nested Schema : Translation
Type:
Show Source
object
-
language(required):
string
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.
-
languageISO:
string
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)
-
name(required):
string
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
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 create/replace an activity type group by submitting a PUT request on the REST resource using cURL:
cURL command Example
The following shows an example of the cURL command.
curl -u 'clientId@instance:clientSecret' \ -X PUT \ --url https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypeGroups/mnt \ --data-binary '{ "translations":[ { "language":"en", "name":"Maintenance" }, { "language":"es", "name":"mantenimiento" } ] } '
Response Header Example
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Mon, 14 Oct 2019 10:48:34 GMT Content-Type: application/json; charset=utf-8 Connection: close
Response Body Example
The following shows an example of the response body in JSON format.
{ "label": "mnt", "name": "Maintenance", "translations": [ { "language": "en", "name": "Maintenance", "languageISO": "en-US" }, { "language": "es", "name": "mantenimiento", "languageISO": "es-ES" } ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypeGroups/mnt" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/activityTypeGroups" } ] }