POST api/Activity/GetActivity

Get an activity

Exceptions

ExceptionCondition
UnauthorizedHttpResponseException

If ticket cannot be validated or if you do not have access to activity

ArgumentNullHttpResponseException

If any arguments are null

ArgumentOutOfRangeHttpResponseException

If any arguments out for range

Examples

The sample below show how to setup a call the GetActivity




 var arg = {
     TicketId : "71137607-4587-44C9-BE92-A699180E42C9",
     CombinedActivityId : "sesam10:1234567"
 }
 $.ajax({
     url: 'https://api.infocare.com/api/Activity/GetActivity',
     type: "POST",
     data: JSON.stringify(arg),
     contentType: "application/json;charset=utf-8"
 })
 .done(function (result) {
     // you should now iterate through ActivityUpdates to get all values, but
     // we just print returned activity number to the console
     console.log("got activity, id: " + result.CombinedActivityId);
 })
 .fail(function (jqXHR, textStatus, err) {
     console.log("getting activity failed: " + err);
 })
 

Request Information

URI Parameters

None.

Body Parameters

Identifies the activity to retrieve, specify the ActivityIdArgumentModel.CombinedActivityId property

ActivityIdArgumentModel
NameDescriptionTypeAdditional information
CombinedActivityId

Get or set combined activity id

string

None.

FormName

Gets or sets the optional FormName. The FormName is used to limit the number of fields returned from GetActivity.

string

None.

TicketId

Gets or sets the ticket id

string

None.

Culture

Gets or sets culture, if not specified we will use culture set on user.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CombinedActivityId": "sample string 1",
  "FormName": "sample string 2",
  "TicketId": "sample string 3",
  "Culture": "sample string 4"
}

application/xml, text/xml

Sample:
<ActivityIdArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
  <Culture>sample string 4</Culture>
  <TicketId>sample string 3</TicketId>
  <CombinedActivityId>sample string 1</CombinedActivityId>
  <FormName>sample string 2</FormName>
</ActivityIdArgumentModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ActivityIdArgumentModel'.

Response Information

Resource Description

An activity if found, Null otherwise

ActivityReturnModel
NameDescriptionTypeAdditional information
CombinedActivityId

Gets or sets the combined activity id

string

None.

TransactionKey

Gets or sets the transaction key you got when getting the activity

string

None.

ActivityUpdates

Gets or sets a list of update actions.

Collection of AttributeUpdateModel

None.

AllowableActions

Sets or gets allowable actions. Note that enumeration is a bit/flag enumeration.

AllowableActivityActions

None.

CombinedContractLineId

Gets or sets the combined contract line

string

None.

CombinedPerformanceId

Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null

string

Json null value handling: Ignore

Response Formats

application/json, text/json

Sample:
{
  "CombinedActivityId": "sample string 1",
  "TransactionKey": "sample string 2",
  "ActivityUpdates": [
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    },
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    }
  ],
  "AllowableActions": 1,
  "CombinedContractLineId": "sample string 3",
  "CombinedPerformanceId": "sample string 4"
}

application/xml, text/xml

Sample:
<ActivityController.ActivityReturnModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Controllers">
  <CombinedPerformanceId xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 4</CombinedPerformanceId>
  <ActivityUpdates xmlns:d2p1="http://schemas.datacontract.org/2004/07/Rostov.Models">
    <d2p1:AttributeUpdateModel>
      <d2p1:AttributeAction>Add</d2p1:AttributeAction>
      <d2p1:AttributeData />
      <d2p1:AttributeName>sample string 1</d2p1:AttributeName>
      <d2p1:AttributeTransaction>sample string 2</d2p1:AttributeTransaction>
      <d2p1:AttributeType>Field</d2p1:AttributeType>
    </d2p1:AttributeUpdateModel>
    <d2p1:AttributeUpdateModel>
      <d2p1:AttributeAction>Add</d2p1:AttributeAction>
      <d2p1:AttributeData />
      <d2p1:AttributeName>sample string 1</d2p1:AttributeName>
      <d2p1:AttributeTransaction>sample string 2</d2p1:AttributeTransaction>
      <d2p1:AttributeType>Field</d2p1:AttributeType>
    </d2p1:AttributeUpdateModel>
  </ActivityUpdates>
  <AllowableActions>AddComment</AllowableActions>
  <CombinedActivityId>sample string 1</CombinedActivityId>
  <CombinedContractLineId>sample string 3</CombinedContractLineId>
  <TransactionKey>sample string 2</TransactionKey>
</ActivityController.ActivityReturnModel>