REST API - View a news article

Last modified on 2023/02/21 11:19

Minimum version Service Manager: Oxygen 2.1.3

GET  /news/{document_id}

  • This method allows information for a specified news article to be obtained.
          example /news/19001

Notes

       Open url.png  see Service Manager REST API Conventions

  • If successful, an HTTP status code 200 is returned.
    • A URL link (HREF) to the resource is provided.
    • All fields are provided, including e_field_name and available_field_x, except for certain sensitive fields reserved for EasyVista.
       

List of parameters / fields

Mandatory parameters

You must use the parameter below in the URL.
 

Parameter Type Description / Example
document_id number News article identifier

Optional parameters

None

Optional fields

None

HTTP status codes for the method

StatusHeader

   A Timeout error code will be returned if the server does not respond to the REST Web service request within a given time (by default 60 seconds).

Code Error Description
Status200
200 OK (Successful) Request successfully processed.
Status401
401 Unauthorized Incorrect authentication process for accessing the resource: Incorrect login/password, invalid session, incorrect Service Manager account.

example

{
 "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

{
 "error": "Resource not found"
}

Example

Result with a status code 200 returned

{
   "HREF": "https://{your_server}/api/v1/{your_account}/news/19001",
   "CREATION_DATE": "",
   "CREATION_DATE_UT": "",
   "DEPARTMENT_PATH": "",
   "DEPARTMENT_ID": "5",
   "DESCRIPTION": {
       "HREF": "https://{your_server}/api/v1/{your_account}/news/19001/description"
    },
   "DISPLAY_LAST_UPDATE": "1",
   "DOCUMENT_ID": "19001",
   "DOCUMENT_NAME": "News Create with Rest2 updated",
   "DOCUMENT_TYPE": "",
   "E_KEYWORDS": "",
   "E_PICTURE": "",
   "END_DATE": "",
   "FRONT_OFFICE": "1",
   "GUID": "",
   "ID": "",
   "INSTALL": "",
   "IS_EMBEDDED": "0",
   "IS_NEWS": "1",
   "IS_NOTIFICATION": "",
   "L_EN": "0",
   "L_FR": "1",
   "L_GE": "1",
   "L_IT": "1",
   "L_L1": "",
   "L_L2": "",
   "L_L3": "",
   "L_L4": "",
   "L_L5": "",
   "L_L6": "",
   "L_PO": "1",
   "L_SP": "1",
   "LAST_UPDATE": "2020-02-10",
   "LOCATION_PATH": "",
   "LOCATION_ID": "6",
   "MAJOR_INCIDENT_ID": "",
   "MODULE": "",
   "ORIGIN_TOOL_ID": "1",
   "PHYSICAL_NAME": "",
   "PRIORITY": "",
   "REQUEST_ID": "",
   "SD_CATALOG_PATH": "Incidents/Hardware/Workstation",
   "SD_CATALOG_ID": "4702",
   "START_DATE": "",
   "TABLE_NAME": "",
   "UPLOADED_BY_ID": "",
   "REQUEST": {
       "MAX_RESOLUTION_DATE_UT": "",
       "REQUEST_ID": "",
       "RFC_NUMBER": "",
       "SUBMIT_DATE_UT": ""
    }
}
ConventionsAPI

REST API Conventions

Convention Meaning
Orange Parameters used in an HTTP request string which do not correspond to Service Manager database fields.

example   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 Service Manager database fields.

example   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 Service Manager database fields; they allow the value of a database field to be assigned or modified.

example   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 Service Manager database fields.

example   Method Reopen an incident/request

{  "restarted": {  "comment": "string (required)"  }  }
Tags:
Powered by XWiki © EasyVista 2022