Rate this page:
This resource represents assets in Jira. These assets may have been populated in Jira from another application. Use this resource to get, search for, create, update, and delete assets in Jira.
PUT /rest/assetapi/asset/bulk
Creates new assets or updates existing assets. Note that updating assets will overwrite their properties with the properties defined in the request object.
Array<asset>
A list of up to 25 assets to be created or updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
curl --request PUT \
--url '/rest/assetapi/asset/bulk' \
--header 'Content-Type: application/json' \
--data '{
"putRequest": [
{
"origin": {
"appKey": "com.myasset.app",
"originId": "5-113-51143-2032"
},
"label": {
"value": "MacBook Pro 15\" 2016"
},
"type": {
"appKey": "com.myasset.app",
"originId": "5-113-51143-2032"
},
"assignee": {
"accountId": "27505:c73cd17f-ae93-4f10-911c-d754d02420be",
"email": "test@example.com"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
}
]
}
]
}'
Returned if the resource is accepted to be asynchronously processed.
A schema has not been defined for this response code.
GET /rest/assetapi/asset
Returns a list of all assets
Array<string>
The asset type to filter by. Set this to the concatenation of the asset type’s appKey
and originId
, in the format appKey/originId
.
true
integer
The index of the first item to return in a page of results (page offset).
0
, Format: int32
integer
The maximum number of items to return per page. Note that this may be constrained by the Assets platform service.
20
, Minimum: 0
, Maximum: 100
, Format: int32
1 2 3
curl --request GET \
--url '/rest/assetapi/asset' \
--header 'Accept: application/json'
Returned if the request is successful. The response may be empty, if no results are found.
Content type | Value |
---|---|
application/json |
PUT /rest/assetapi/asset
Creates a new asset or updates an existing asset. Note that updating an asset will overwrite its properties with the properties defined in the request object.
Asset
The asset type's origin.
The asset type's label.
The asset type's origin.
The asset's assignee.
Array<fieldValue>
The list of asset's fields, this is an arbitrary list of vendor specific fields which will be available for searching.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
curl --request PUT \
--url '/rest/assetapi/asset' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"origin": {
"appKey": "com.myasset.app",
"originId": "5-113-51143-2032"
},
"label": {
"value": "MacBook Pro 15\" 2016"
},
"type": {
"appKey": "com.myasset.app",
"originId": "5-113-51143-2032"
},
"assignee": {
"accountId": "27505:c73cd17f-ae93-4f10-911c-d754d02420be",
"email": "test@example.com"
},
"fields": [
{
"fieldId": "RAM",
"value": "8GB DDR4 2400MHz"
}
]
}'
Returned if the resource is updated.
Content type | Value |
---|---|
application/json |
GET /rest/assetapi/asset/{appKey}/{originId}
string
The app key, which should be the Connect app key. This parameter is used to scope the originId
.
string
The identifier of an asset/asset type. This is the same identifier for the asset/asset type in its origin (external) system.
1 2 3
curl --request GET \
--url '/rest/assetapi/asset/{appKey}/{originId}' \
--header 'Accept: application/json'
Returned if the request is successful.
Content type | Value |
---|---|
application/json |
DELETE /rest/assetapi/asset/{appKey}/{originId}
string
The app key, which should be the Connect app key. This parameter is used to scope the originId
.
string
The identifier of an asset/asset type. This is the same identifier for the asset/asset type in its origin (external) system.
1 2
curl --request DELETE \
--url '/rest/assetapi/asset/{appKey}/{originId}'
Returned if the request is successful.
A schema has not been defined for this response code.
GET /rest/assetapi/asset/search
Searches assets matching the query
parameter. Only assets with an appKey matching an installed asset management app will be returned. If no asset management apps are installed, falls back to returning all assets.
string
The search term that will be matched with either label, origin or fields values.
Array<string>
The asset type to filter the search by. Set this to the concatenation of the asset type’s appKey
and originId
, in the format appKey/originId
.
true
Array<string>
The assignees to filter the search by. Set one of these values to unassigned
if you want to include unassigned
assets.
true
Array<string>
The assignee the search is prioritized by. This means that results with an assignee matching this one will be promoted to the top of the list. If multiple prioritizedAssignee parameters are specified, only the first one will be used.
integer
The maximum number of items to return per page. Note that this may be constrained by the Assets platform service.
10
, Minimum: 0
, Maximum: 100
, Format: int32
1 2 3
curl --request GET \
--url '/rest/assetapi/asset/search' \
--header 'Accept: application/json'
Returns a list of assets ordered by relevance to the query
parameter. The response may be empty, if no matching assets were found.
Content type | Value |
---|---|
application/json |
Rate this page: