GET /api/v1/asset_classes
List all asset_classes

Examples

GET /api/v2/asset-classes
200
{
  "data": [
    {
      "id": "1",
      "type": "asset-classes",
      "links": {
        "self": "http://test.host/api/v2/asset-classes/1"
      },
      "attributes": {
        "name": "Computers 21"
      }
    },
    {
      "id": "2",
      "type": "asset-classes",
      "links": {
        "self": "http://test.host/api/v2/asset-classes/2"
      },
      "attributes": {
        "name": "Shoes 22"
      }
    }
  ],
  "meta": {
    "total-pages": 1,
    "record-count": 2
  },
  "links": {
    "first": "http://test.host/api/v2/asset-classes?page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "http://test.host/api/v2/asset-classes?page%5Bnumber%5D=1&page%5Bsize%5D=10"
  }
}

GET /api/v1/asset_classes/:id
Show an asset_class

Examples

GET /api/v2/asset-classes/3
200
{
  "data": {
    "id": "3",
    "type": "asset-classes",
    "links": {
      "self": "http://test.host/api/v2/asset-classes/3"
    },
    "attributes": {
      "name": "Toys 23"
    }
  }
}

Params

Param name Description
id
required

AssetClass ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


POST /api/v1/asset_classes
Create an asset_class

Examples

POST /foundry-api/v1/asset-classes
{
  "data": {
    "type": "asset-classes",
    "attributes": {
      "name": "Sports 8"
    }
  }
}
201
{
  "data": {
    "id": "8",
    "type": "asset-classes",
    "links": {
      "self": "http://test.host/foundry-api/v1/asset-classes/8"
    },
    "attributes": {
      "name": "Sports 8"
    }
  }
}

Params

Param name Description
data
required

AssetClass information

Validations:

  • Must be a Hash

data[type]
required

Validations:

data[attributes]
required

Validations:

  • Must be a Hash

data[attributes][name]
required

Validations:

  • Must be a String


PATCH /api/v1/asset_classes/:id
Update an asset_class

Examples

PATCH /foundry-api/v1/asset-classes/13
{
  "data": {
    "id": "13",
    "type": "asset-classes",
    "attributes": {
      "name": "Russia"
    }
  }
}
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

Params

Param name Description
id
required

AssetClass ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data
required

AssetClass information

Validations:

  • Must be a Hash

data[type]
optional

Validations:

data[attributes]
optional

Validations:

  • Must be a Hash

data[attributes][name]
optional

Validations:

  • Must be a String


DELETE /api/v1/asset_classes/:id
Delete an asset_class

Examples

DELETE /foundry-api/v1/asset-classes/2
204
{}

Params

Param name Description
id
required

AssetClass ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.