Home Page > GET api/services/get/{Id}

Gets a specific service by the service ID.

Examples

C#

Guid serviceId = GetServiceId();
            string url = "https://iamgaoapiurl/api/services/get/" + serviceId.ToString();
            string logonToken = GetLogonToken();
            HttpWebRequest httpRequest = (HttpWebRequest)HttpWebRequest.Create(url);
            httpRequest.ContentType = "application/json";
            ServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => true);
            httpRequest.Method = "GET";
            httpRequest.Headers.Set("X_GovernanceAutomation_Access_Token", logonToken);
            
            //Get response on the web request from Governance Automation Online Web API.
            JObject service = null;
            HttpWebResponse response = (HttpWebResponse)httpRequest.GetResponse();
            using (Stream responseStream = response.GetResponseStream())
            {
                using (StreamReader responseReader = new StreamReader(responseStream, Encoding.UTF8))
                {
                    string reply = responseReader.ReadToEnd();
                    service = JsonConvert.DeserializeObject(reply) as JObject;
                }
            }
            string serviceName = service.GetValue("Name").Value ();;

Request Information

URI Parameters

NameDescriptionType
Id

Gets or sets the service ID.

globally unique identifier

Response Information

APIService

Request Information

URI Parameters

NameDescriptionType
Id

Gets or sets the service ID.

globally unique identifier
Name

Gets or sets the name of a service.

string
LanguageID

Gets or sets the locale ID of the language that is specified in a service.

integer
Description

Gets or sets the description of a service.

string
HideRequestSummaryAndDescription

Gets or sets the setting of hiding request summary and notes to approvers.

boolean
CategoryId

Gets or sets the ID of the service category that is specified in a service.

string
CategoryName

Gets or sets the name of the service category that is specified in a service.

string
Type

Gets or sets the type of a service.

APIServiceType
Permissions

Gets or sets the permission configuration of a service.

string
Contact

Gets or sets the service contact.

string
Created

Gets or sets the created time of a service.

date
Modified

Gets or sets the last modified time of a service.

date
CreatedBy

Gets or sets the login name of the user who created the service.

string
ModifiedBy

Gets or sets the login name of the user who modified the service.

string
Department

Gets or sets the department that is specified in a service.

string
Status

Gets or sets the status of a service, active or inactive.

APIServiceStatus
AdminContact

Gets or sets the administrator contact of a service.

string
APIRequest

Gets or sets a template request for a service.

APIRequest
Metadata

Gets or sets the custom metadata that is applied to a service.

string
MaintenanceSchedule

Gets or sets the service request execution schedule that is applied to a service.

APIServiceMaintenanceInfo
CustomActivity

Gets or sets the custom actions that are applied to a service.

APICustomActivityInfo

Response Formats

application/json, text/json

Sample:
{
  "Id": "eb8c130f-bda4-41f4-9f8c-0ab7a41ac808",
  "Name": "sample string 2",
  "LanguageID": 3,
  "Description": "sample string 4",
  "CategoryId": "sample string 5",
  "CategoryName": "sample string 6",
  "Type": 0,
  "Permissions": "sample string 7",
  "Contact": "sample string 8",
  "Created": "2015-04-16T15:25:44.7123821+08:00",
  "Modified": "2015-04-16T15:25:44.7123821+08:00",
  "CreatedBy": "sample string 11",
  "ModifiedBy": "sample string 12",
  "Department": "sample string 13",
  "Status": 0,
  "AdminContact": "sample string 14",
  "APIRequest": {
    "RequestId": "3d946e37-930f-450f-a165-3e96e893337d",
    "ServiceId": "b1867733-ec43-4664-a2f4-9e523ae35ca2",
    "Department": "sample string 3",
    "Summary": "sample string 4",
    "Description": "sample string 5",
    "NotesToApprover": "sample string 6",
    "IsDeleted": true,
    "Type": 8,
    "Requester": "sample string 9",
    "Status": 0,
    "ProgressStatus": 0,
    "Submitted": "2015-04-16T15:25:44.7123821+08:00",
    "Modified": "2015-04-16T15:25:44.7123821+08:00",
    "Created": "2015-04-16T15:25:44.7123821+08:00",
    "AssignTo": "sample string 12",
    "WorkflowInstaceID": "8ade26cc-7b8f-4cad-80d7-9d9f4d4e8afb",
    "MetadataList": [
      {
        "ID": "87472b08-aa46-49da-876c-eba7314c1c67",
        "Name": "sample string 2",
        "Value": "sample string 3"
      },
      {
        "ID": "87472b08-aa46-49da-876c-eba7314c1c67",
        "Name": "sample string 2",
        "Value": "sample string 3"
      }
    ]
  },
  "Metadata": "sample string 15",
  "MaintenanceSchedule": {
    "EnableMaintenance": true,
    "MaintenanceScheduleId": "1b32b84d-c328-4037-9618-e2ebae04e629",
    "MaintenanceScheduleChoice": 1,
    "Details": "sample string 2"
  },
  "CustomActivity": {
    "BeforeAPExecution": {
      "MethodName": "sample string 1",
      "WebServiceAddress": "sample string 2",
      "Arguments": [
        "sample string 1",
        "sample string 2"
      ],
      "ArgumentsNames": [
        "sample string 1",
        "sample string 2"
      ]
    },
    "AfterAPExecution": {
      "MethodName": "sample string 1",
      "WebServiceAddress": "sample string 2",
      "Arguments": [
        "sample string 1",
        "sample string 2"
      ],
      "ArgumentsNames": [
        "sample string 1",
        "sample string 2"
      ]
    },
    "PostExecution": {
      "MethodName": "sample string 1",
      "WebServiceAddress": "sample string 2",
      "Arguments": [
        "sample string 1",
        "sample string 2"
      ],
      "ArgumentsNames": [
        "sample string 1",
        "sample string 2"
      ]
    }
  }
}

application/xml, text/xml

Sample:
<APIService xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.avepoint.com">
  <APIRequest>
    <AssignTo>sample string 12</AssignTo>
    <Created>2015-04-16T15:25:44.7123821+08:00</Created>
    <Department>sample string 3</Department>
    <Description>sample string 5</Description>
    <IsDeleted>true</IsDeleted>
    <MetadataList xmlns:d3p1="http://schemas.datacontract.org/2004/07/AvePoint.GA.WebAPI.Models.Settings">
      <d3p1:APIRequestMetadata>
        <d3p1:ID>87472b08-aa46-49da-876c-eba7314c1c67</d3p1:ID>
        <d3p1:Name>sample string 2</d3p1:Name>
        <d3p1:Value>sample string 3</d3p1:Value>
      </d3p1:APIRequestMetadata>
      <d3p1:APIRequestMetadata>
        <d3p1:ID>87472b08-aa46-49da-876c-eba7314c1c67</d3p1:ID>
        <d3p1:Name>sample string 2</d3p1:Name>
        <d3p1:Value>sample string 3</d3p1:Value>
      </d3p1:APIRequestMetadata>
    </MetadataList>
    <Modified>2015-04-16T15:25:44.7123821+08:00</Modified>
    <NotesToApprover>sample string 6</NotesToApprover>
    <ProgressStatus>None</ProgressStatus>
    <RequestId>3d946e37-930f-450f-a165-3e96e893337d</RequestId>
    <Requester>sample string 9</Requester>
    <ServiceId>b1867733-ec43-4664-a2f4-9e523ae35ca2</ServiceId>
    <Status>Saved</Status>
    <Submitted>2015-04-16T15:25:44.7123821+08:00</Submitted>
    <Summary>sample string 4</Summary>
    <Type>8</Type>
    <WorkflowInstaceID>8ade26cc-7b8f-4cad-80d7-9d9f4d4e8afb</WorkflowInstaceID>
  </APIRequest>
  <AdminContact>sample string 14</AdminContact>
  <CategoryId>sample string 5</CategoryId>
  <CategoryName>sample string 6</CategoryName>
  <Contact>sample string 8</Contact>
  <Created>2015-04-16T15:25:44.7123821+08:00</Created>
  <CreatedBy>sample string 11</CreatedBy>
  <CustomActivity xmlns:d2p1="http://schemas.datacontract.org/2004/07/AvePoint.GA.WebAPI.Models">
    <d2p1:AfterAPExecution>
      <d2p1:Arguments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:Arguments>
      <d2p1:ArgumentsNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:ArgumentsNames>
      <d2p1:MethodName>sample string 1</d2p1:MethodName>
      <d2p1:WebServiceAddress>sample string 2</d2p1:WebServiceAddress>
    </d2p1:AfterAPExecution>
    <d2p1:BeforeAPExecution>
      <d2p1:Arguments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:Arguments>
      <d2p1:ArgumentsNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:ArgumentsNames>
      <d2p1:MethodName>sample string 1</d2p1:MethodName>
      <d2p1:WebServiceAddress>sample string 2</d2p1:WebServiceAddress>
    </d2p1:BeforeAPExecution>
    <d2p1:PostExecution>
      <d2p1:Arguments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:Arguments>
      <d2p1:ArgumentsNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:ArgumentsNames>
      <d2p1:MethodName>sample string 1</d2p1:MethodName>
      <d2p1:WebServiceAddress>sample string 2</d2p1:WebServiceAddress>
    </d2p1:PostExecution>
  </CustomActivity>
  <Department>sample string 13</Department>
  <Description>sample string 4</Description>
  <Id>eb8c130f-bda4-41f4-9f8c-0ab7a41ac808</Id>
  <LanguageID>3</LanguageID>
  <MaintenanceSchedule xmlns:d2p1="http://schemas.datacontract.org/2004/07/AvePoint.GA.WebAPI.Models">
    <d2p1:Details>sample string 2</d2p1:Details>
    <d2p1:EnableMaintenance>true</d2p1:EnableMaintenance>
    <d2p1:MaintenanceScheduleChoice>1</d2p1:MaintenanceScheduleChoice>
    <d2p1:MaintenanceScheduleId>1b32b84d-c328-4037-9618-e2ebae04e629</d2p1:MaintenanceScheduleId>
  </MaintenanceSchedule>
  <Metadata>sample string 15</Metadata>
  <Modified>2015-04-16T15:25:44.7123821+08:00</Modified>
  <ModifiedBy>sample string 12</ModifiedBy>
  <Name>sample string 2</Name>
  <Permissions>sample string 7</Permissions>
  <Status>Inactive</Status>
  <Type>None</Type>
</APIService>