Get an Agent's execution history

get/bots/{agentId}/history
Internal-Use Only

Get an Agent's execution history by ID. This endpoint provides a collection of history records ordered from most recent to oldest. The properties that can be used as filter criteria are:

  • id,
  • status, and
  • runId.

Request Samples

1

Response Samples

1{
2 "version": 2,
3 "accept": "application/vnd.sas.metadata.bot.history",
4 "count": 1,
5 "start": 0,
6 "limit": 10,
7 "name": "history",
8 "items": [
9 {
10 "version": 1,
11 "id": "ba14bc66-8aaf-4a57-bff1-87a39774ac1a",
12 "status": "completed",
13 "createdBy": "sasuser",
14 "creationTimeStamp": "2021-09-17T18:51:02.78Z",
15 "endTimeStamp": "2021-09-17T19:16:53.213Z",
16 "nEnumerated": 290,
17 "nExcluded": 49,
18 "nAdded": 239,
19 "nUpdated": 0,
20 "nRemoved": 0,
21 "averageRunTime": 1550,
22 "parameters": {
23 "datasourceURI": "/dataSources/providers/Compute/sources/eb654570-efb4-4d61-9814-3444869805b0~fs~SASHELP"
24 },
25 "jobParameters": {
26 "samplePercent": "20"
27 },
28 "links": [
29 {
30 "method": "GET",
31 "rel": "newAssets",
32 "href": "/catalog/search?type=adv&q=runId:4fa4b36a-e50a-48a5-89ea-7c9d472cb9ab+runStatus:new",
33 "uri": "/catalog/search?type=adv&q=runId:4fa4b36a-e50a-48a5-89ea-7c9d472cb9ab+runStatus:new",
34 "type": "application/vnd.sas.metadata.search.collection",
35 "itemType": "application/vnd.sas.metadata.search.result"
36 },
37 {
38 "method": "GET",
39 "rel": "changedAssets",
40 "href": "/catalog/search?type=adv&q=runId:4fa4b36a-e50a-48a5-89ea-7c9d472cb9ab+runStatus:changed",
41 "uri": "/catalog/search?type=adv&q=runId:4fa4b36a-e50a-48a5-89ea-7c9d472cb9ab+runStatus:changed",
42 "type": "application/vnd.sas.metadata.search.collection",
43 "itemType": "application/vnd.sas.metadata.search.result"
44 }
45 ]
46 }
47 ],
48 "links": [
49 {
50 "method": "GET",
51 "rel": "self",
52 "href": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a/history?start=0&limit=10",
53 "uri": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a/history?start=0&limit=10",
54 "type": "application/vnd.sas.collection",
55 "itemType": "application/vnd.sas.metadata.bot.history"
56 },
57 {
58 "method": "GET",
59 "rel": "collection",
60 "href": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a/history",
61 "uri": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a/history",
62 "type": "application/vnd.sas.collection",
63 "itemType": "application/vnd.sas.metadata.bot.history"
64 },
65 {
66 "method": "GET",
67 "rel": "up",
68 "href": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a",
69 "uri": "/catalog/bots/ba14bc66-8aaf-4a57-bff1-87a39774ac1a",
70 "type": "application/vnd.sas.metadata.bot"
71 }
72 ]
73}

Path Parameters

NameTypeRequiredDescription
agentId
string
true

The ID of the Agent

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Filter criteria for returned objects. See Filtering in REST APIs.

limit
integer
false

Maximum number of objects to return. Defaults to 10.

start
integer
false

0-based Offset of first object to return. Defaults to 0.

Header Parameters

NameTypeRequiredDescription
Accept
string
false

The desired representation for the response.

Allowed values:
application/vnd.sas.collection+jsonapplication/json
Default:
application/vnd.sas.collection+json
Accept-Item
string
false

The desired item representation, the default is application/vnd.sas.metadata.bot.history+json.

Allowed values:
application/vnd.sas.metadata.bot.history+jsonapplication/json
Default:
application/vnd.sas.metadata.bot.history+json

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestBad request (the request is not well-formed).Schema
401UnauthorizedNot authenticated.Schema
403ForbiddenThe user does not have permission to complete this request.Schema
404Not FoundThe specified resource was not found.Schema
406Not AcceptableNot Acceptable. Include an Accept header with a supported value on the request.Schema
415Unsupported Media TypeUnsupported Media Type. Include a Content-Type header with a supported value in the request.Schema