Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To interact with the Checkout APIs for Jira Cloud, you'll need to authenticate your requests using Basic Authentication. This method requires an API token and your email address.

Steps to Authenticate:

  1. Generate an API Token:

    • Log in to your Jira Cloud account.

    • Navigate to Account Settings.

    • Select Security.

    • Click on Create and manage API tokens.

    • Generate a new API token and store it securely.

  2. Prepare Your Credentials:

    • Combine your email address and API token in the format:

      Code Block
      user@example.com:your_api_token
  3. Encode Credentials in Base64:

    • Use a Base64 encoder to encode the combined string.

    • For example, in Python:

      Code Block
      languagepy
      import base64
      
      credentials = 'user@example.com:your_api_token' 
      encoded_credentials = base64.b64encode(credentials.encode('utf-8')).decode('utf-8')
  4. Include in HTTP Authorization Header:

    • Add the following header to your API requests:

      Code Block
      Authorization: Basic encoded_credentials
      Domain: your-domain

‘your-domain’ is from your cloud instance url: https://<your-domain>.atlassian.net/

Example

If your email is user@example.com and your API token is abcd1234, your combined string is:

Code Block
user@example.com:abcd1234

Encoded in Base64, this becomes (for illustration purposes):

Code Block
dXNlckBleGFtcGxlLmNvbTphYmNkMTIzNA==

Your Authorization header will be (with example Jira url: https://example-jira.atlassian.net):

Code Block
Authorization: Basic dXNlckBleGFtcGxlLmNvbTphYmNkMTIzNA==
Domain: https://your-url.atlassian.netexample-jira

Using the AssetType REST Endpoint

The AssetType endpoint allows you to retrieve information about different asset types managed within Checkout.

Endpoint URL:

Code Block
GET https://checkout.mumosystems.com/rest/checkout/1.0/assettype

Parameters:

  • This endpoint requires projectId parameters for a basic GET request.

Example Request Using cURL:

Code Block
curl -X GET 
\ 'https://checkout.mumosystems.com/rest/checkout/1.0/assettype?projectId=10001' 
\ -H 'Authorization: Basic dXNlckBleGFtcGxlLmNvbTphYmNkMTIzNA==' 
\ -H 'Domain: https://<your-domain>.atlassian.net/your-domain'
\ -H 'Content-Type: application/json'
Expand
titleExample Response
Code Block
[
  {
    "originId": "fd01b336-c6f6-430c-8646-fb55d877aafa",
    "name": "My Asset Type",
    "image": "https://my-icon-url.org/",
    "description": "An asset type's description",
    "mapping": {
      "workspaceId": "1574",
      "schemaId": "1454",
      "typeId": "95472",
      "attributes": [
        {
          "assetAttrId": "cf89d9ee-a325-4baf-bafa-6813e8280116",
          "insightAttrId": "594197"
        }
      ]
    },
    "attributes": [
      {
        "id": "cf89d9ee-a325-4baf-bafa-6813e8280116",
        "providerId": null,
        "name": "Id",
        "dataType": "SHORT_TEXT",
        "description": null,
        "default": false,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "706c5e44-ea0a-41e2-99c3-9418f2998a8c",
        "providerId": null,
        "name": "Name",
        "dataType": "SHORT_TEXT",
        "description": "Asset name is the name by which the asset is know",
        "default": true,
        "required": true,
        "computable": true,
        "options": null
      },
      {
        "id": "serialNumber",
        "providerId": null,
        "name": "Serial Number",
        "dataType": "SHORT_TEXT",
        "description": "A serial number is a unique identifier assigned incrementally or sequentially to an item",
        "default": true,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "modelNumber",
        "providerId": null,
        "name": "Model Number",
        "dataType": "SHORT_TEXT",
        "description": "An identifier of a product given by its manufacturer",
        "default": true,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "98d8bdac-7ced-4c88-8454-8029563fee91",
        "providerId": null,
        "name": "Assignee",
        "dataType": "USER",
        "description": "Person who is assigned the asset",
        "default": true,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "itemId",
        "providerId": null,
        "name": "Item",
        "dataType": "ITEM",
        "description": "Reference Identifier to the Item",
        "default": true,
        "required": false,
        "computable": true,
        "options": null
      },
      {
        "id": "04156a2b-f01c-4644-bb02-5de24499d971",
        "providerId": null,
        "name": "Vendor",
        "dataType": "VENDOR",
        "description": "Reference Identifier to the Vendor",
        "default": true,
        "required": false,
        "computable": true,
        "options": null
      },
      {
        "id": "14e5757c-f7e4-4db8-8454-dce5e69abbee",
        "providerId": null,
        "name": "Status",
        "dataType": "DROPDOWN",
        "description": "Status for the asset",
        "default": true,
        "required": false,
        "computable": false,
        "options": [
          {
            "id": "5a359c94-e484-45d5-9bf0-01ac80431951",
            "value": "Inventory"
          },
          {
            "id": "efa72fe3-7d03-4b84-b000-4991a601d439",
            "value": "In Use"
          },
          {
            "id": "9b976433-4cb9-4bab-8d74-2db5466de00f",
            "value": "In Repair"
          },
          {
            "id": "7e5f9865-c379-4e4c-bc76-1628b106a134",
            "value": "Retired"
          }
        ]
      },
      {
        "id": "dateAssigned",
        "providerId": null,
        "name": "Date Assigned",
        "dataType": "DATE",
        "description": null,
        "default": false,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "deleted-at",
        "providerId": null,
        "name": "Date Deleted",
        "dataType": "DATE",
        "description": null,
        "default": false,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "issueKey",
        "providerId": null,
        "name": "Issue Key",
        "dataType": "SHORT_TEXT",
        "description": null,
        "default": false,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "projectId",
        "providerId": null,
        "name": "Project Id",
        "dataType": "SHORT_TEXT",
        "description": null,
        "default": false,
        "required": false,
        "computable": false,
        "options": null
      },
      {
        "id": "f5966e1b-04a3-4e7b-8aee-bc6165eb9aaf",
        "providerId": null,
        "name": "My Custom Number Type Att",
        "dataType": "NUMBER",
        "description": "My Custom Number Type Att",
        "default": false,
        "required": false,
        "computable": false,
        "options": []
      },
      {
        "id": "eac33e30-3756-4749-9376-53da1914e660",
        "providerId": null,
        "name": "Custom Option Group Field",
        "dataType": "DROPDOWN",
        "description": "Description",
        "default": false,
        "required": false,
        "computable": false,
        "options": [
          {
            "id": "15d0f8d3-c2b4-48c2-8076-4b5eb01f22e1",
            "value": "Opt 1"
          },
          {
            "id": "f8e4ba0b-1319-4efc-8646-dc6391fe37cb",
            "value": "Opt 2"
          },
          {
            "id": "989dde53-8b66-4dec-b5f4-4cb0f79055e0",
            "value": "Opt 3"
          }
        ]
      },
      {
        "id": "9d46aceb-243b-4981-803f-1577a100089b",
        "providerId": null,
        "name": "Custom Multi Select",
        "dataType": "MULTI_SELECT",
        "description": "Desc...",
        "default": false,
        "required": false,
        "computable": false,
        "options": [
          {
            "id": "3c67748c-f55e-4b4e-8f64-4cdc185a3507",
            "value": "Opt 1"
          },
          {
            "id": "f72badac-f21b-41d8-a7a1-89c7c76e9a63",
            "value": "Opt 2"
          },
          {
            "id": "d2c391b0-2fec-420a-84b6-4c40fe364b45",
            "value": "Opt 3"
          }
        ]
      },
      {
        "id": "5b84a65f-44ad-40b5-84aa-9beb4ee84fd3",
        "providerId": null,
        "name": "Custom Chekboxes",
        "dataType": "CHECKBOXES",
        "description": "Desc...",
        "default": false,
        "required": false,
        "computable": false,
        "options": [
          {
            "id": "0e0eaa9e-0c20-4021-89b3-270f8aadcedc",
            "value": "Checkbox 1"
          },
          {
            "id": "e1df0097-c464-4bc2-807d-96e591fd8650",
            "value": "Checkbox 2"
          },
          {
            "id": "a046fd7b-0401-4764-b49c-01575e9b1eb1",
            "value": "Checkbox 3"
          }
        ]
      }
    ]
  }
]


Write into our Support Desk with any questions you have.

Enjoying Checkout? Leave us a review!