Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Documentation for AssetForms app REST API v1.0


Configuration

To access AssetForms REST APIs you will need a token. Token can be generated via AssetForms app configuration

In "Manage apps" look for "AssetForms for Jira" and click "Configure" button

You will be presented with the configuration options available in AssetForms. Click on "API tokens" tab

Click on generate to generate new access token for the AssetForms REST API

Server URL is https://app.assetforms.com

API prefix /rest/api/v1


AssetForms REST API endpoints


MethodURL endpointRequest parametersErrorsExample
Get asset type by IDGET/assettype/get/{token}/{assetTypeId}

400 - When "assetTypeId" is missing

404 - When asset type cannot be found by given ID

{
    "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 typesGET/assettype/list/{token}
Empty JSON array is returned when you don't have any asset type registered
[
{
    "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 assetsGET

/asset/search/{token}/{assetTypeId}

  • query
  • sort
  • startAt
  • limit
  • expandFields

By default 100 assets is load per page
Create or update assetPOST/asset/save/{token}/{assetTypeId}


Get asset by IDGET/asset/get/{token}/{assetTypeId}/{entryId}


Delete asset by IDDELETE/asset/delete/{token}/{assetTypeId}/{entryId}








Common errors

HTTP 401 is returned when "Authentication token is missing" or "Invalid or expired token"

  • No labels