Update Organisation Service
This endpoint updates a service within an organisation, allowing for the definition or modification of key attributes such as service name, type, functionality, and configuration settings. The request includes details on supported features, dependencies, and infrastructure integration.
Syntax: see 'CCall Structure
Type = 'PATCH'
'https://connect.cambrionix.com/api/v1/organizations/organisation-id/service/' |
Variable | Description |
---|---|
organisation-id | This is the unique id of the organisation as a unique 128-bit number |
In the data section of the request, include the information you wish to add, formatted as shown below.
{ "id": "service-id", "address": { "hostName": "service-hostname", "port": service-port } "name": "service-name", "description": "service-description" "activated": activated } |
Variable | Description |
---|---|
service-id | This is the id of the service as a unique 128-bit number |
service-hostname | This is the hostname of the service |
service-port | This is the port the service is using |
service-name | This is the name of the service |
service-description | This is the description of the service |
activated | Is the service activated or not |
Returns:
{ "created": { "time": time, "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "updated": { "time": time }, "id": "service-id, "activated": activated, "roles": [ { "id": "role-id", "name": "role-name", "type": "role-type", "description": "role-description", "permissions": { "allowed": ["permission"], "denied": ["permission"] } } ], "type": "service-type", "address": { "hostName": "service-hostname", "port": service-port }, "computer": { "id": "computer-id", "name": "computer-name" }, "organization": { "id": "organisation-id", "name": "organisaion-name }, "secret": "service-secret" } |
Output | Description |
---|---|
time | The hub time, shown as an integer in ms |
computer-id | This is the id of the computer as a unique 128-bit number |
user-id | This is the id of the user as a unique 128-bit number |
given-name | The first name of the user |
surname | The surname of the user |
display-name | The account name of the user |
account-email | The email of the user |
service-id | This is the id of the service as a unique 128-bit number |
activated | Is the service activated or not |
role-id | This is the id of the role as a unique 128-bit number |
role-name | The name of the role |
role-type | The type of role such as organisation or Built-in role |
role-description | The description of the role |
permission | The associated permission names and descriptions |
service-type | This is the type of service e.g. cloud or host |
service-hostname | This is the hostname of the service |
service-port | This is the port the service is using |
computer-id | This is the id of the computer as a unique 128-bit number |
computer-name | The name of the computer |
organisation-id | This is the id of the organisation as a unique 128-bit number |
organisation-name | This is the name of the organisation |
service-secret | The secret of the service |
Example
curl -X 'PATCH' \
'https://connect.cambrionix.com/api/v1/organizations/40f5a1a7-3119-4961-8493-866c4053b7eb/service' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSRWVr3PLFot1QOr_cZywOzirLs1dnB2i-GLos5KPc5X3A' \
-H 'Content-Type: application/json' \
-d '{
"id": "string",
"address": {
"hostName": "example.com",
"port": 0
},
"name": "string",
"description": "string",
"activated": true
}'
Returns
This response has been truncated for clarity within the manual.
{
"result": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "host",
"detail": {
"name": "string",
"description": "string"
},
"roles": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "organization",
"name": "string",
"description": "string",
"permissions": {
"name": "string",
"description": "string"
}
}
],
"computer": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"address": {
"hostName": "example.com",
"port": 0
},
"activated": true
}
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned