Versions Compared

Key

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

...

MethodResult
URIhttps://[CompanyID].crittah.com/ws/apiv2/[json or xml]/users
GETReturns data defining customer statusof all users

Data fields

FieldValue typeMandatoryDescriptionExample
IDUserstring Unique identifier of the type7090fad1-c4da-4488-9ceb-55ee9847edcc
Salutationstring Salutation of the userMr
FirstNamestring First name of the userJohn
LastNamestring Last name of the userSmith

Get

...

users

Sample cURL call:

Code Block
curl -H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://[CompanyID].crittah.com/ws/apiv2/json/users

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfStatus xmlns="http://schemas.datacontract.org/2004/07/Spinifex.lib.objects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <Status>
      <IDStatus>926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa</IDStatus>
      <StatusName>Active</StatusName>
      <Description>Active</Description>
   </Status>
   <Status>
      <IDStatus>e9fafb7c-6830-4a97-b795-4601f5157134</IDStatus>
      <StatusName>General</StatusName>
      <Description>General</Description>
   </Status>
   <Status>
      <IDStatus>5ca214d1-4f29-462f-9e77-561ede9ee415</IDStatus>
      <StatusName>Inactive</StatusName>
      <Description>Inactive</Description>
   </Status>
</ArrayOfStatus>

Job Statuses

Returns a list of all job statuses configured in Crittah.

Data fields

FieldValue typeMandatoryDescriptionExample
IDJobTypestring Unique ID for the job type. This is required to return the statuses for s specifc job typ7090fad1-c4da-4488-9ceb-55ee9847edcc
IDStatusstring Unique identifier of the type7090fad1-c4da-4488-9ceb-55ee9847edcc
StatusNamestring Salutation of the userMr
Descriptionstring First name of the userJohn

Get job type statuses

To obtain the status for a given job type you need to specify the job type ID in the call. Each job type can have a specific workflow so the statuses for each job can differ.

Sample cURL call:

Code Block
curl -H "Content-Type: application/json"  \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://[CompanyID].crittah.com/ws/apiv2/json/statuses/jobtype/BD176BE9-8C1B-4CD3-9B54-5AD51B2DE3F4

JSON Rsponse:

Code Block
[
  {
    "IDStatus": "1aabdc9c-ba61-4aa4-93d1-11f21c47807b",
    "StatusName": "In-Progress",
    "Description": "Job has is in progress"
  },
  {
    "IDStatus": "f24909a7-b645-4260-95d6-175753f9d643",
    "StatusName": "Complete",
    "Description": "Job Completed"
  },
  {
    "IDStatus": "cbe9cc90-5465-46d8-9e10-34671a4c420f",
    "StatusName": "Closed",
    "Description": "Job Closed"
  }
]

XML Response: 

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfJobStatus xmlns="http://schemas.datacontract.org/2004/07/Spinifex.lib.objects" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <JobStatus>
      <IDStatus>1aabdc9c-ba61-4aa4-93d1-11f21c47807b</IDStatus>
      <StatusName>In-Progress</StatusName>
      <Description>Job has is in progress</Description>
   </JobStatus>
   <JobStatus>
      <IDStatus>f24909a7-b645-4260-95d6-175753f9d643</IDStatus>
      <StatusName>Complete</StatusName>
      <Description>Job Completed</Description>
   </JobStatus>
   <JobStatus>
      <IDStatus>cbe9cc90-5465-46d8-9e10-34671a4c420f</IDStatus>
      <StatusName>Closed</StatusName>
      <Description>Job Closed</Description>
   </JobStatus>
</ArrayOfJobStatus>