Read (GET) ActivityParameterSets
Read using the HTTP GET operation.
Code Examples
Request
Method | Request URI | HTTP Version |
---|---|---|
GET |
HTTPS://<HOST>:<PORT>/00000000-0000-0000-0000-000000000000/ActivityParameterSets(guid'<GUID>') |
HTTP/1.1 |
Request URI Parameters
URI Parameter | Description |
---|---|
GUID |
Required. The unique identifier value (ActivityParameterSetID) for an Activity entity. |
Request URI Example
Example URI |
---|
GET https://sma-server:9090/00000000-0000-0000-0000-000000000000/ActivityParameterSets()?$filter=ActivityID%20eq%20guid'd61bdd0a-7df7-4284-97b2-a50746443ab7' 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
Any details or caveats about receiving this 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://waplabvm4: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://waplabvm4:9090/00000000-0000-0000-0000-000000000000/ActivityParameterSets</id>
<title type="text">ActivityParameterSets</title>
<updated>2014-03-31T20:57:28Z</updated>
<link rel="self" title="ActivityParameterSets" href="ActivityParameterSets" />
<entry>
<id>https://waplabvm4:9090/00000000-0000-0000-0000-000000000000/ActivityParameterSets(guid'd18c41eb-85a9-4257-8776-dbb0880e33e0')</id>
<category term="Orchestrator.ResourceModel.ActivityParameterSet" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="ActivityParameterSet" href="ActivityParameterSets(guid'd18c41eb-85a9-4257-8776-dbb0880e33e0')" />
<link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/Activity" type="application/atom+xml;type=entry" title="Activity" href="ActivityParameterSets(guid'd18c41eb-85a9-4257-8776-dbb0880e33e0')/Activity" />
<link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/ActivityParameters" type="application/atom+xml;type=feed" title="ActivityParameters" href="ActivityParameterSets(guid'd18c41eb-85a9-4257-8776-dbb0880e33e0')/ActivityParameters" />
<title />
<updated>2014-03-31T20:57:28Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:ActivityParameterSetID m:type="Edm.Guid">d18c41eb-85a9-4257-8776-dbb0880e33e0</d:ActivityParameterSetID>
<d:Name>__AllParameterSets</d:Name>
<d:TenantID m:type="Edm.Guid">00000000-0000-0000-0000-000000000000</d:TenantID>
<d:IsDefault m:type="Edm.Boolean">false</d:IsDefault>
<d:ActivityID m:type="Edm.Guid">d61bdd0a-7df7-4284-97b2-a50746443ab7</d:ActivityID>
</m:properties>
</content>
</entry>
</feed>
Code Examples
The following example searches for the ActivityParameterSets of a specific Activity.
namespace CodeSample.Microsoft.SystemCenter.SMA
{
public class SMASamples
{
public static void Main()
{
//ActivityParameters
// 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 api = new OrchestratorApi(new Uri(serviceEndPoint));
// Set credentials to the default or to a specific user.
((DataServiceContext)api).Credentials = CredentialCache.DefaultCredentials;
//((DataServiceContext)api).Credentials = new NetworkCredential("user", "pwd", "domain");
try
{
// Listing the ActivityParameterSets for a specific Activity.
// Identify a specific activity instance to search for.
System.Guid activityID = new Guid("d61bdd0a-7df7-4284-97b2-a50746443ab7");
// Query for the specific activity instance identified by ActivityID.
var activity = api.Activities.Where(r => r.ActivityID == activityID).FirstOrDefault();
// Query for the activity parameter sets associated with the specific activity instance identified by ActivityID.
var activityParameterSets = api.ActivityParameterSets.Where(r => r.ActivityID == activity.ActivityID);
// Output select properties of the instance to the console.
foreach (var activityParameterSet in activityParameterSets)
{
Console.WriteLine(" ");
Console.WriteLine("Activity ID : {0}", activity.ActivityID);
Console.WriteLine("Activity Name : {0}", activity.Name);
Console.WriteLine("Activity Parameter Set ID : {0}", activityParameterSet.ActivityParameterSetID);
Console.WriteLine("Activity Parameter Set Name : {0}", activityParameterSet.Name);
};
Console.ReadKey();
}
catch (Exception ex)
{
throw new ApplicationException("An error occurred during execution.", ex);
}
}
}
}