Read (GET) RunbookParameters
Read using the HTTP GET operation.
Code Examples
Request
Method | Request URI | HTTP Version |
---|---|---|
GET |
HTTPS://<HOST>:<PORT>/00000000-0000-0000-0000-000000000000/RunbookParameters('<NAME>') |
HTTP/1.1 |
Request URI Parameters
URI Parameter | Description |
---|---|
Name |
Required. The unique identifier value (Name) for a RunbookParameter entity. |
Request URI Example
Example URIs |
---|
GET https://sma-server:9090/00000000-0000-0000-0000-000000000000/RunbookParameters(guid'159fb0d4-8c32-4388-8944-a7ac07678d18') HTTP/1.1 |
GET https://sma-server:9090/00000000-0000-0000-0000-000000000000/RunbookParameters()?$filter=cast(RunbookVersionID,'Edm.Guid')%20eq%20guid'a9fcc76f-ace4-4b87-9d7a-478fff427842' HTTP/1.1 |
Request Headers
For more information about the common request headers used by this operation, see Standard Service Management Automation POST/GET/PUT/DELETE Headers.
Request Body
The GET operation has no request body.
Response
Response Codes
Response Code | Description |
---|---|
HTTP/1.1 200 OK |
Successful HTTP request. |
Response Headers
For more information about the common response headers used by this operation, see Standard Service Management Automation POST/GET/PUT/DELETE Headers.
Response Body
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://sma-server:9090/00000000-0000-0000-0000-000000000000/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<id>https://sma-server:9090/00000000-0000-0000-0000-000000000000/RunbookParameters</id>
<title type="text">RunbookParameters</title>
<updated>2014-04-17T14:52:59Z</updated>
<link rel="self" title="RunbookParameters" href="RunbookParameters" />
<entry>
<id>https://sma-server:9090/00000000-0000-0000-0000-000000000000/RunbookParameters(Name='UserEmail',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')</id>
<category term="Orchestrator.ResourceModel.RunbookParameter" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="RunbookParameter" href="RunbookParameters(Name='UserEmail',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')" />
<link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/RunbookVersion" type="application/atom+xml;type=entry" title="RunbookVersion" href="RunbookParameters(Name='UserEmail',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')/RunbookVersion" />
<title />
<updated>2014-04-17T14:52:59Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:RunbookVersionID m:type="Edm.Guid">a9fcc76f-ace4-4b87-9d7a-478fff427842</d:RunbookVersionID>
<d:Name>UserEmail</d:Name>
<d:Type>System.String</d:Type>
<d:IsMandatory m:type="Edm.Boolean">true</d:IsMandatory>
<d:Position m:type="Edm.Int32">1</d:Position>
</m:properties>
</content>
</entry>
<entry>
<id>https://sma-server:9090/00000000-0000-0000-0000-000000000000/RunbookParameters(Name='UserName',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')</id>
<category term="Orchestrator.ResourceModel.RunbookParameter" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="RunbookParameter" href="RunbookParameters(Name='UserName',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')" />
<link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/RunbookVersion" type="application/atom+xml;type=entry" title="RunbookVersion" href="RunbookParameters(Name='UserName',RunbookVersionID=guid'a9fcc76f-ace4-4b87-9d7a-478fff427842')/RunbookVersion" />
<title />
<updated>2014-04-17T14:52:59Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:RunbookVersionID m:type="Edm.Guid">a9fcc76f-ace4-4b87-9d7a-478fff427842</d:RunbookVersionID>
<d:Name>UserName</d:Name>
<d:Type>System.String</d:Type>
<d:IsMandatory m:type="Edm.Boolean">true</d:IsMandatory>
<d:Position m:type="Edm.Int32">0</d:Position>
</m:properties>
</content>
</entry>
</feed>
Code Examples
The following example searches for a RunbookParameters associated with a Runbook.
namespace CodeSample.Microsoft.SystemCenter.SMA
{
public class SMASamples
{
public static void Main()
{
// Replace this with the name of your SMA web service endpoint.
string serviceEndPoint = "https://sma-server:9090/00000000-0000-0000-0000-000000000000";
// Setup the connection to SMA
OrchestratorApi SMAService = new OrchestratorApi(new Uri(serviceEndPoint));
// Set credentials to the default or to a specific user.
((DataServiceContext)SMAService).Credentials = CredentialCache.DefaultCredentials;
//((DataServiceContext)SMAService).Credentials = new NetworkCredential("user", "pwd", "domain");
// Identify a specific runbook instance to search for.
var runbookName = "Sample-Managing-UserAccounts";
var runbook = api.Runbooks.Where(r => r.RunbookName == runbookName).First();
// Query for the specific runbookparameter instances associated with the runbook.
var runbookParameters = api.RunbookParameters.Where(r => r.RunbookVersionID == runbook.PublishedRunbookVersionID);
foreach(var runbookParameter in runbookParameters)
{
// Output select properties of the instance to the console.
Console.WriteLine("Found Parameter Name : {0}", runbookParameter.Name);
Console.WriteLine("Found Parameter Type : {0}", runbookParameter.Type);
}
Console.ReadKey(); catch (Exception ex)
{
throw new ApplicationException("An error occurred during execution.", ex);
}
}
}
}