- Print
- PDF
Resource Labels
- Print
- PDF
1. Create a Resource Label
This POST method is used to create a resource label.
POST | {{url}}/api/resource-manager/labels |
Request Example
curl --location --request POST '{{url}}/api/resource-manager/labels' \
--header 'Authorization: TOKEN {{apiToken}}'
--data-raw '
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}'
Response Example
Status: 201 Created |
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}
2. Retrieve Resource Labels
This GET method is used to retrieve a list of all resource labels
GET | {{url}}/api/resource-manager/labels |
Request Parameters
The request parameters used in this method are shown in the following table:
Parameter | Description | Data Type | Required |
searchText | Filter resource labels by searching text. | String | Optional |
page | Specifies the page number of the resource labels records to retrieve, | Integer | Optional |
size | Specifies the number of resource label records to retrieve per page, | Integer | Optional |
sort | Specifies the sorting and direction. | String | Optional |
Request Example
curl --location --request GET '{{url}}/api/resource-manager/labels' \
--header 'Authorization: TOKEN {{apiToken}}'
Response Example
Status: 200 OK |
{
"count": 0,
"page": 0,
"size": 0,
"sort": "string",
"data": [
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}
]
}
3. Manage Resource Label
This PUT method is used to manage a resource label.
PUT | {{url}}/api/resource-manager/labels/{keyId} |
Request Parameters
The request parameters used in this method are shown in the following table:
Parameter | Description | Data Type | Required |
keyId | Resource label key ID. | String | Mandatory |
Request Example
curl --location --request PUT '{{url}}/api/resource-manager/labels/{keyId}' \
--header 'Authorization: TOKEN {{apiToken}}'
--data-raw '
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}'
Response Example
Status: 200 OK |
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}
4. Retrieve Resource Label Key Details
This GET method is used to retrieve all details of a resource label key.
GET | {{url}}/api/resource-manager/labels/{keyId} |
Request Parameters
The request parameters used in this method are shown in the following table:
Parameter | Description | Data Type | Required |
keyId | Resource Label Key ID | String | Mandatory |
Request Example
curl --location --request GET '{{url}}/api/resource-manager/labels/{keyId} \
--header 'Authorization: TOKEN {{apiToken}}'
Response Example
Status: 201 Created |
{
"keyId": "string",
"keyName": "string",
"internal": true,
"description": "string",
"values": [
{
"valueId": "string",
"keyId": "string",
"name": "string",
"description": "string",
"createdBy": 0,
"updatedBy": 0,
"resourceCount": 0,
"createdOn": "string",
"updatedOn": "string"
}
]
}
5. Delete a Resource Label
This DELETE method deletes a resource label.
DELETE | {{url}}/api/resource-manager/labels/{keyId} |
Request Parameters
The request parameters used in this method are shown in the following table:
Parameter | Description | Data Type | Required |
keyId | Resource Label key ID. | String | Mandatory |
Request Example
curl --location --request DELETE '{{url}}/api/resource-manager/labels/{keyId}' \ --header 'Authorization: TOKEN {{apiToken}}'
Response Example
Status: 204 No Content |