Create or replace an activity type group
/rest/ofscMetadata/v1/activityTypeGroups/{label}
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
-
label(required): string
Minimum Length:
1Maximum Length:40The label of the activity type group.
objectActivity Type Group-
label:
string
Title:
LabelMinimum Length:1Maximum Length:32The label of the activity type group. -
translations:
array Translations
Title:
TranslationsThe array of translation objects associated with the activity type group.
arrayTranslationsobject-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
Response
- application/json
- application/schema+json
200 Response
object-
activityTypes:
array Activity Types
Title:
Activity TypesThe array of activity type objects associated with the activity type group.
-
object
Activity Type Group
Title:
Activity Type GroupThe object representing group activity types.
arrayActivity TypesobjectActivity Type Group-
label:
string
Title:
LabelMinimum Length:1Maximum Length:32The label of the activity type group. -
translations:
array Translations
Title:
TranslationsThe array of translation objects associated with the activity type group.
object-
label(required):
string
The label of the activity type object.
arrayTranslationsobject-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
201 Response
object-
activityTypes:
array Activity Types
Title:
Activity TypesThe array of activity type objects associated with the activity type group.
-
object
Activity Type Group
Title:
Activity Type GroupThe object representing group activity types.
arrayActivity TypesobjectActivity Type Group-
label:
string
Title:
LabelMinimum Length:1Maximum Length:32The label of the activity type group. -
translations:
array Translations
Title:
TranslationsThe array of translation objects associated with the activity type group.
object-
label(required):
string
The label of the activity type object.
arrayTranslationsobject-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
Default Response
object-
detail:
string
The detailed information about the error.
-
status:
string
The HTTP status code.
-
title:
string
The summary of the error message.
-
type:
string
The URL of the page containing the error details.
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"
}
]
}