JobType and Skill

This API allows listing, retrieving, creating, updating, and deleting jobtype and skills as well as associate skills to jobtype.

List JobType

GET /jobtype/

List all jobtypes.

Sample request:

GET /jobtype/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

Sample response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "count": 100,
  "items": [
    {
      "name": "Standard Service",
      "uuid": "d6d22438096503fe72a7c161201c9373"
    },
    {
      "name": "Installation",
      "uuid": "28a01f359aabafb4ff28347bddd9a24f"
    },
    {
      "name": "Special Installation",
      "uuid": "6a360274f3fa2e224e17ba9ece3f4b0a"
    }
  ],
  "page": 0,
  "pageSize": 3,
  "sortedBy": []
}
Query Parameters:
  • sortedBy – Available sorting criteria: name

  • name – A filtering value for jobtype name

Get JobType

GET /jobtype/(jobtype_ref)

Retrieve a given jobtype.

Sample request:

GET /jobtype/d6d22438096503fe72a7c161201c9373 HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

Sample response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "name": "Standard Service Heat Cable",
  "uuid": "d6d22438096503fe72a7c161201c9373",
  "archived": false
}

Create JobType

POST /jobtype/

Create a new jobtype.

Sample request:

POST /jobtype/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

{
  "name": "A new Service"
}
Request JSON Object:
  • name (string) – Name of the jobtype (required)

Sample response:

HTTP/1.1 201 Created
Content-Type: application/json

{
  "name": "A new Service",
  "uuid": "00bd62a92a004faea233951510167cad"
}

Update JobType

PUT /jobtype/(jobtype_ref)

Update a given skill.

Sample request:

PUT /jobtype/d6d22438096503fe72a7c161201c9373 HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

{
  "name": "Updated Service"
}

Sample response:

HTTP/1.1 204 NO CONTENT

Archive JobType

PUT /jobtype/(jobtype_ref)/archive

Archives a given JobType. By archiving a JobType it will be removed from any customers using it.

Sample request:

PUT /jobtype/d6d22438096503fe72a7c161201c9373/archive HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

Sample response:

HTTP/1.1 204 NO CONTENT
Status Codes:

Unarchive JobType

PUT /jobtype/(jobtype_ref)/unarchive

Unarchives a previously archived JobType.

Sample request:

PUT /jobtype/d6d22438096503fe72a7c161201c9373/unarchive HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

Sample response:

HTTP/1.1 204 NO CONTENT
Status Codes:

Delete JobType

DELETE /jobtype/(jobtype_ref)

Delete a given jobtype.

Sample request:

DELETE /jobtype/00bd62a92a004faea233951510167cad HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

Sample response:

HTTP/1.1 204 No Content

List Skill

GET /skill/

List all skills.

Sample request:

GET /skill/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

Sample response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "count": 100,
  "items": [
    {
      "name": "Standard Skill",
      "uuid": "d6d22438096503fe72a7c161201c9373"
    },
    {
      "name": "Installation Skill",
      "uuid": "28a01f359aabafb4ff28347bddd9a24f"
    },
    {
      "name": "Special Installation Skill",
      "uuid": "6a360274f3fa2e224e17ba9ece3f4b0a"
    }
  ],
  "page": 0,
  "pageSize": 3,
  "sortedBy": []
}
Query Parameters:
  • sortedBy – Available sorting criteria: name

  • name – A filtering value for skill name

Get Skill

GET /skill/(skill_ref)

Retrieve a given skill.

Sample request:

GET /skill/d6d22438096503fe72a7c161201c9373 HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

Sample response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "name": "Standard Skill",
  "uuid": "d6d22438096503fe72a7c161201c9373"
}

Create Skill

POST /skill/

Create a new skill.

Sample request:

POST /skill/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

{
  "name": "A new Skill"
}
Request JSON Object:
  • name (string) – Name of the skill (required)

Sample response:

HTTP/1.1 201 Created
Content-Type: application/json

{
  "name": "A new Skill",
  "uuid": "00bd62a92a004faea233951510167cad"
}

Update Skill

PUT /skill/(skill_ref)

Update a given skill.

Sample request:

PUT /skill/d6d22438096503fe72a7c161201c9373 HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

{
  "name": "Updated Skill"
}

Sample response:

HTTP/1.1 204 NO CONTENT

Delete Skill

DELETE /skill/(skill_ref)

Delete a given skill.

Sample request:

DELETE /skill/00bd62a92a004faea233951510167cad HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 687fe20baeef448bb30db579139dad33
Accept: application/json

Sample response:

HTTP/1.1 204 No Content

Associate Skills to a JobType

POST /jobtype/(jobtype_ref)/skill/

Create or update JobType-Skill association.

Sample request:

POST /jobtype/d6d22438096503fe72a7c161201c9373/skill/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

{
  "skills": [
    {
      "skill": {"uuid": "00bd62a92a004faea233951510167cad"},
      "required": true
    },
    {
      "skill": {"uuid": "bd62a0092a0041510167cadfaea23395"},
      "required": false
    }
  ]
}
Request JSON Object:
  • required (string) – Whether the skill is mandatory for the JobType

Sample response:

HTTP/1.1 204 No Content
Content-Type: application/json

List Skills associated to a JobType

GET /jobtype/(jobtype_ref)/skill/

List al JobType-Skill associations.

Sample request:

GET /jobtype/d6d22438096503fe72a7c161201c9373/skill/ HTTP/1.1
Host: api.fieldaware.net
Authorization: Token 9dcae3660ec84eac94bb506e09a9af40
Accept: application/json

Sample response:

HTTP/1.1 200 OK
Content-Type: application/json

{"skills": [
    {
      {"skill": {"uuid": "00bd62a92a004faea233951510167cad"},
      "required": true,
      "name": "update skill"
    },
    {
      {"skill": {"uuid": "aea233951510167cad00bd62a92a004f"},
      "required": false,
      "name": "new skill"
    }
  ]
}