Lookup Asset ID

get

/mobile/tools/1.0/assets/lookup

Returns the ID of the asset that's identified by its name and version.

Request

Supported Media Types
Query Parameters
  • Full name and version of the asset in the format namespace/name(version) for APIs and connectors, and name(version) for other asset types.
  • The asset's type.
    Allowed Values: [ "API", "MobileBackend", "Connector", "APIImplementation", "Client", "StorageCollection", "Package" ]
Back to Top

Response

Supported Media Types

200 Response

Asset metadata.
Headers
  • The ETag corresponds to the state of the asset (that is, the value increments by one on each change operation). You can use this ETag with the `If-Match` HTTP header on a request.
Body ()
Asset information (short form).
Root Schema : assetShort
Type: object
Asset information (short form).
Show Source

404 Response

An asset with the specified name and version doesn't exist.
Body ()
Root Schema : error
Type: object
Show Source
Nested Schema : errorDetails
Type: object
Show Source
Back to Top

Examples

This example shows how to get the ID of an asset that's identified by its name and version. It gets the ID of the asset that's of type API, is in the custom namespace, is version 1.0, and is named incidentreport.

curl -i -X GET  -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/mobile/tools/1.0/assets/lookup?type=API&fqn=custom/incidentreport(1.0)"

Example of Response Header

Here's an example of the response headers.

200 OK
Content-Length: 85
Content-Type: application/json
Date: Tue, 10 Jul 2018 00:46:31 GMT

Example of Response Body

Here's the contents of the response body.

{
    "id": "ce6b3adb-4c8d-47d7-98ab-95b15f2db00f",
    "name": "incidentreport",
    "version": "1.0"
}
Back to Top