REST API - Update a ticket


PUT  /requests/{rfc_number}

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.
  • If the list of parameters is a combination of both existing and non-existing fields, the request returns an HTTP status code 201 as long as at least one field is found and its value modified. If no field is found, the request is considered incorrect and an HTTP status code 400 is returned.
  • If successful, an HTTP status code 201 is returned and a URL link (HREF) to the updated resource is provided.
CommonNotes_JSONandFields
  • JSON Format and Field Format:
    • The field names are those of the Product name - ev itsm.png.data model.
              Example documentation icon EN.png  available_field_1
    • To update a field, respect the following JSON format: "field_name":"value".
               Example documentation icon EN.png  "e_mail": "test@easyvista.com"
    • JSON object names, including those representing Product name - ev itsm.png database fields, are not case sensitive.
               Example documentation icon EN.png  field_name, Field_Name and FIELD_NAME are equivalent 

List of parameters / objects

Mandatory parameters

You must use the mandatory parameter below in the URL.
 

Parameter Type Description / Example
rfc_number string Ticket identifier

Optional parameters

None

Optional fields

  • You can use all the fields from the AM_EMPLOYEE table except those mentioned below in the body of the HTTP request.

    rfc_number ; request_id ; location_id ; request_project_id ; recipient_id ; urgency_id ; severity_id ; status_id ; department_id ; parent_request_id ; last_group_id ; last_done_by_id ; submitted_by ; kbase_id ; sla_id ; sd_catalog_id ; initial_sd_catalog_id ; order_id ; news_id ; project_idvert case

     
  • You can modify the value of the fields referenced in other tables, related to a specific alias.
     
Parameter Type Description / Example
analytical_charge_id string or integer
  • Table: EP_ANALYTICAL_CHARGE
  • Value to be used: ANALYTICAL_CHARGE_CODE or ANALYTICAL_CHARGE_ID
Example documentation icon EN.png {"ANALYTICAL_CHARGE_ID": "0302"} or {"ANALYTICAL_CHARGE_ID": "1"}
asset_id integer
  • Table: AM_ASSET
  • Value to be used: Primary Key
Example documentation icon EN.png {“asset_id": "27618"}
asset_serial string
  • Table: AM_ASSET
  • Value to be used: SERIAL_NUMBER
Example documentation icon EN.png {"ASSET_SERIAL": "MGTRDF"}
asset_tag or asset string
  • Table: AM_ASSET
  • Value to be used: ASSET_TAG
Example documentation icon EN.png {"ASSET_TAG": "10164R"} or {"ASSET": "10164R"}
available_field_x string
  • Table: SD_REQUEST
  • Value to be used: text
Example documentation icon EN.png {"AVAILABLE_FIELD_1": "available_field_1_test"}
ci string
  • Table: AM_ASSET
  • Value to be used: NETWORK_IDENTIFIER
Example documentation icon EN.png {"CI": "SQL-RDB_IT*"}
ci_id integer
  • Table: AM_ASSET
  • Value to be used: ASSET_TAG
Example documentation icon EN.png {"CI_ID": "1"}
ci_serial string
  • Table: AM_ASSET
  • Value to be used: SERIAL_NUMBER
Example documentation icon EN.png {"CI_SERIAL": "KD78QGJYU"}
continuity_plan_id string or integer
  • Table: CMDB_CONTINUITY_PLAN
  • Value to be used: CODE or CONTINUITY_PLAN_ID
Example documentation icon EN.png {"CONTINUITY_PLAN_ID": "CP01"} or {"CONTINUITY_PLAN_ID": "1"}
description string
  • Table: SD_REQUEST
  • Value to be used: text
Example documentation icon EN.png {"Description": "Here, your description"}
external_reference string
  • Table: SD_REQUEST
  • Value to be used: text
Example documentation icon EN.png {"External_reference": "external_ref_test"}
known_problems_id integer
  • Table: SD_KNOWN_PROBLEMS
  • Value to be used: Primary Key
Example documentation icon EN.png {"KNOWN_PROBLEMS_ID": "1"}
net_price_cur_id string ou integer
  • Table: AM_CURRENCY
  • Value to be used: CURRENCY or CURRENCY_ID
Example documentation icon EN.png {"NET_PRICE_CUR_ID": "EUR"} or {"NET_PRICE_CUR_ID": "3"}
origin_tool_id integer
  • Table : SD_REQUEST
  • Valeur à utiliser : ORIGIN_TOOL_ID
Example documentation icon EN.png {"ORIGIN_TOOL_ID": "1"} ou {"ORIGIN_TOOL_ID": "2"}
owner_id string or integer
  • Table: AM_EMPLOYEE
  • Value to be used: LAST_NAME or EMPLOYEE_ID
Example documentation icon EN.png {"OWNER_ID": "Leblanc, Fred"} or {"OWNER_ID": "10469"}
owning_group_id string or integer
  • Table: AM_GROUP
  • Value to be used: GROUP_LNG or GROUP_ID
Example documentation icon EN.png {"OWNING_GROUP_ID": "Desktop USA"} or {"OWNING_GROUP_ID": "139"}
release_id string or integer
  • Table: CMDB_RELEASE
  • Value to be used: RELEASE_CODE or RELEASE_ID
Example documentation icon EN.png {"RELEASE_ID": "REL01"} or {"RELEASE_ID": "1"}
rental_net_price_cur_id string
  • Table: AM_CURRENCY
  • Value to be used: CURRENCY or CURRENCY_ID
Example documentation icon EN.png {"RENTAL_NET_PRICE_CUR_ID": "EUR"} or {"RENTAL_NET_PRICE_CUR_ID": "3"}
request_origin_id string or integer
  • Table: SD_REQUEST_ORIGIN
  • Value to be used: NAME_LNG or REQUEST_ORIGIN_ID
Example documentation icon EN.png {"REQUEST_ORIGIN_ID" : "Fax"} or {"REQUEST_ORIGIN_ID": "2"}
requestor_phone string
  • Table: SD_REQUEST
  • Value to be used: text
Example documentation icon EN.png {"REQUESTOR_PHONE" : "93-63-65-23"}
root_cause_id string or integer
  • Table: AM_REFERENCE
  • Value to be used: REFERENCE_LNG or REFERENCE_ID
Example documentation icon EN.png {"ROOT_CAUSE_ID": "Virus"} or {"ROOT_CAUSE_ID": "70"}
submit_date_ut string
  • Table: SD_REQUEST
  • Value to be used: text
Example documentation icon EN.png {"SUBMIT_DATE_UT" : "07/22/2017"}
system_id string or integer
  • Table: AM_REFERENCE
  • Value to be used: REFERENCE_LNG or REFERENCE_ID
Example documentation icon EN.png {"SYSTEM_ID": "Supervisor"} or {"SYSTEM_ID": "1"}
  • In addition to the fields provided by Logo - EasyVista.png, you can also assign values to fields which you have added to the Product name - ev itsm.png database. These are fields with the prefix e_.
             Example documentation icon EN.png e_field_name_xyz

HTTP status codes for the method

StatusHeader
Code Error Description
Status201
201 Created Request processed successfully and an item created.
Status400
400 Bad Request Request formulated incorrectly and cannot be executed correctly.
Example documentation icon EN.png
{
 "error": "Nothing to update (check fieldnames)"
}
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

Example of the body of an HTTP request

{
 "Comment": "REST API Update - This comment has been updated from the REST API",
 "available_field_1": "Patching computers",
 "external_reference": "TEST"
}

Result with a status code 201 returned

{
 "HREF": "https://{your_server}/api/v1/{your_account}/requests/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:30
Created by Administrator XWiki on 2017/04/07 12:02

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