REST API - Finish an action of a ticket


PUT  /actions/{rfc_number}

  • You can end one or more ongoing actions of the ticket simultaneously.

Notes

      Open url.png  see Product name - ev itsm.png REST API Conventions 

  • You must supply a table in JSON format in the body of the HTTP request.
  • To end a specified action, you must use an end_action object having a JSON object (name/value pair) as its value. This is called an action_id and its value is the identifier for the action you wish to end. 
  • To end all current actions simultaneously, you must use the name of the end_action object without a value.
     
  • If successful, an HTTP status code 201 is returned and a URL link (HREF) to the updated resource is provided.
  • To fill in the support person who has actually carried out the action (doneby_id field), you must use one of the fields below. Note: Only a user belonging to the group in charge of the action are authorized. Otherwise an HTTP status code 404 is returned.

    • doneby_identification
    • doneby_mail
    • doneby_name

List of parameters / objects

Mandatory parameters

  • You must use the mandatory parameter below in the URL.
  • You must use at least one of the optional JSON objects detailed below in the body of the HTTP request. Otherwise an error is returned.
     
Parameter Type Description / Example
rfc_number string Ticket identifier

Optional parameters

None

Optional fields

  • You can use all the JSON objects from the SD_REQUEST table except those mentioned below in the HTTP request string.
    • automatic_action 
    • delete_action 
    • old_value ; new_value 
    • wizard_guid 
    • to_trunc 
    • table_name ; field_name 
    • is_locked_progress_point 
    • net_charge_cur_id 
    • previous_sibling_id 
    • process_step_id
  • You can specify the action_id field to end a specified action. Otherwise all the ongoing actions of the ticket will be ended.
  • You can specify a group name / email to end the actions of a specified group / email. If you specified an action with a non-matching group, a 404 error will be returned.

Description of the actions carried out

1. End the ongoing actions of the ticket.

  • If the action_id is specified, only that action is ended.
  • If the action_id is not specified, all the ongoing actions associated with the rfc_number are ended.

HTTP status codes for the method

StatusHeader
Code Error Description
Status201
201 Created Request processed successfully and an item created.
Status401
401 Unauthorized Authentication process for accessing the resource is incorrect: Login/Password incorrect, Invalid session, Incorrect Product name - ev itsm.png account.
Example documentation icon EN.png
{
 "error": "Invalid Login / Password"
}
Status404
404 Not Found Resource not found: Incorrect URI, Missing resource, Incorrect communication with the server, rfc_number not found.
Example documentation icon EN.png
{
 "error": "Resource not found"
}
Status405
405 Method not allowed Request method not authorized: not supported or not appropriate for the resource.
Example documentation icon EN.png
{
 "error": "Invalid input parameter"
}

Examples

Examples of the body of an HTTP request

1. To end a specified action:

{
 "end_action": {
   "action_id": "12345",
   "doneby_mail": "morley@itassetservices.com",
   "start_date": "12/10/2016",
   "end_date": "12/11/2016",
   "elapsed_time": "1234",
   "available_field_1": "Closed via REST API call"
  }
}

2. To end all current actions simultaneously:

{
 "end_action": {
   "doneby_mail": "morley@itassetservices.com",
   "start_date": "12/10/2016",
   "end_date": "12/11/2016",
   "elapsed_time": "1234",
   "available_field_1": "Closed via REST API call"
  }
}

Result with a status code 201 returned

{
 "HREF": "https://{your_server}/api/v1/{your_account}/actions/I161019_000003"
}


ConventionsAPI

REST API Conventions

Convention Meaning
Orange Parameters used in an HTTP request string (URL) which do not correspond to Product name - ev itsm.png database fields.
Example documentation icon EN.png   Method View a list of assets
https://{your_server}/api/v1/{your_account}/assets?max_rows=3&fields=asset_tag
Black and Bold Parameters used in the URL of an HTTP request which correspond to Product name - ev itsm.png database fields.
Example documentation icon EN.png   Method View an asset
https://{your_server}/api/v1/{your_account}/assets/{asset_id}
Green Parameters used in the body of an HTTP request which represent JSON object names corresponding to Product name - ev itsm.png database fields; they allow the value of a database field to be assigned or modified.
Example documentation icon EN.png   Method Close an incident/request

{  "closed": {  "end_date": "11/20/2016 12:12:12",  }  }
Parameters used in the body of an HTTP request which represent JSON object names not corresponding to Product name - ev itsm.png database fields.
Example documentation icon EN.png   Method Reopen an incident/request

{  "restarted": {  "comment": "string (required)"  }  }

Tags:
Last modified by Unknown User on 2018/11/14 12:31
Created by Administrator XWiki on 2017/04/07 12:04

Shortcuts

Recent Updates

Haven't been here in a while? Here's what changed recently:

-   Product name - ev itsm.png
-   Product name - ev sas.png

Interesting Content

How to Automate Integration
Add a Shortcut to an App
History
Quick Dashboard
Full text search - Stop Words

Powered by XWiki ©, EasyVista 2018