...
| Method | URL endpoint | Request parameters | Errors | Example |
---|
Get asset type by ID or key | GET | /assettype/get/{token}/{assetTypeIdOrKey} - {token} - REST API access token
- {assetTypeIdOrKey} - asset type ID or key
|
| 400 - When "assetTypeId" is missing 404 - When asset type cannot be found by given ID | Code Block |
---|
{
"key": "ABC",
"created": 1576498471883,
"name": "My ABC asset",
"id": "3b3d80c4-3980-4e5a-9f50-3db69103b193",
"fields": [
{
"name": "mytestfield",
"index": 1,
"description": "Some description here",
"label": "My test field",
"type": "text",
"required": true
},
{
"name": "selectField",
"options": {
"1": "one",
"2": "two",
"3": "three"
},
"index": 2,
"description": "",
"label": "My super dropdown",
"type": "select",
"required": false
}
]
} |
|
---|
List asset types | GET | /assettype/list/{token} - {token} - REST API access token
|
| Empty JSON array is returned when you don't have any asset type registered | Code Block |
---|
[
{
"key": "ABC",
"created": 1576498471883,
"name": "My ABC asset",
"id": "3b3d80c4-3980-4e5a-9f50-3db69103b193",
"fields": [
{
"name": "mytestfield",
"index": 1,
"description": "Some description here",
"label": "My test field",
"type": "text",
"required": true
},
{
"name": "selectField",
"options": {
"1": "one",
"2": "two",
"3": "three"
},
"index": 2,
"description": "",
"label": "My super dropdown",
"type": "select",
"required": false
}
]
},
] |
|
---|
|
|
|
|
|
|
---|
Search assets | GET | /asset/search/{token}/{assetTypeIdOrKey} - {token} - REST API access token
- {assetTypeIdOrKey} - asset type ID or key
| - query - AssetForms Filters expected (empty means no filter and all records for this asset type are returned)
- sort - Sorting in AssetForms
- startAt - starts with 1 for first record if not specified. Must be a positive numeric value and larger than 0
- limit - number of records to show per page. Maximum (and the default) number is 100 records per page
- expandFields - comma separated list of field names to expand. This helps you to load referenced records via smart fields, or rich properties for "user" and "Jira" fields, as well as the data for web-service enabled fields
|
| By default 100 assets is load per page |
---|
Create or update asset | POST | /asset/save/{token}/{assetTypeIdOrKey} |
|
|
|
---|
Get asset by ID or key | GET | /asset/get/{token}/{assetTypeIdOrKey}/{assetIdOrKey} |
|
|
|
---|
Delete asset by ID or key | DELETE | /asset/delete/{token}/{assetTypeIdOrKey}/{assetIdOrKey} |
|
|
|
---|
|
|
|
|
|
|
---|
HTTP 401 is returned when "Authentication token is missing" or "Invalid or expired token" is provided