GET /api/templates/:template_id/foreign_input_sets
List foreign input sets

Examples

GET /api/templates/1007982024/foreign_input_sets
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "template_id": 1007982024,
      "target_template_name": "Job template 144",
      "include_all": true,
      "include": null,
      "exclude": null,
      "id": 17,
      "target_template_id": 1007982025
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template_id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. '<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.


GET /api/templates/:template_id/foreign_input_sets/:id
Show foreign input set details

Examples

GET /api/templates/1007982006-Job%20template%20125/foreign_input_sets/10
200
{
  "template_id": 1007982006,
  "target_template_name": "Job template 126",
  "include_all": true,
  "include": null,
  "exclude": null,
  "id": 10,
  "target_template_id": 1007982007
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template_id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


POST /api/templates/:template_id/foreign_input_sets
Create a foreign input set

Examples

POST /api/templates/1007982015-Job%20template%20134/foreign_input_sets
{
  "foreign_input_set": {
    "target_template_id": 1007982017
  }
}
201
{
  "template_id": 1007982015,
  "target_template_name": "Job template 136",
  "include_all": true,
  "include": null,
  "exclude": null,
  "id": 14,
  "target_template_id": 1007982017
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template_id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

foreign_input_set
required

Validations:

  • Hash

foreign_input_set[target_template_id]
required

Target template ID

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

foreign_input_set[include_all]
optional , nil allowed

Include all inputs from the foreign template

Validations:

  • Must be one of: true, false, 1, 0.

foreign_input_set[include]
optional , nil allowed

A comma separated list of input names to be included from the foreign template.

Validations:

  • String

foreign_input_set[exclude]
optional , nil allowed

A comma separated list of input names to be included from the foreign template.

Validations:

  • String

foreign_input_set[description]
optional , nil allowed

Input set description

Validations:

  • String


DELETE /api/templates/:template_id/foreign_input_sets/:id
Delete a foreign input set

Examples

DELETE /api/templates/1007982009-Job%20template%20128/foreign_input_sets/11
{
  "foreign_input_set": {}
}
200
{
  "id": 11,
  "template_id": 1007982009,
  "target_template_id": 1007982010,
  "include_all": true,
  "include": null,
  "exclude": null
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template_id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


PUT /api/templates/:template_id/foreign_input_sets/:id
Update a foreign input set

Examples

PUT /api/templates/1007982012-Job%20template%20131/foreign_input_sets/12
{
  "foreign_input_set": {
    "target_template_id": ""
  }
}
422
{
  "error": {
    "id": 12,
    "errors": {
      "target_template": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Target template can't be blank"
    ]
  }
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template_id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

foreign_input_set
required

Validations:

  • Hash

foreign_input_set[target_template_id]
optional

Target template ID

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

foreign_input_set[include_all]
optional , nil allowed

Include all inputs from the foreign template

Validations:

  • Must be one of: true, false, 1, 0.

foreign_input_set[include]
optional , nil allowed

A comma separated list of input names to be included from the foreign template.

Validations:

  • String

foreign_input_set[exclude]
optional , nil allowed

A comma separated list of input names to be included from the foreign template.

Validations:

  • String

foreign_input_set[description]
optional , nil allowed

Input set description

Validations:

  • String