The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The examples displayed herein illustrate using API request to perform varying actions, including creating, retrieving, updating, and deleting single instances, creating multiple instances, exporting instance json, and viewing transaction details for a requested operation. Activities are performed in these examples using the curl command line tool. Each example shows the command and the console output.
API calls are illustrated:
User authorization is for two administrator users:
Field Display Policies and Configuration Templates in URL parameters can differ according to the MenuLayout associated with the user role; for example, the url parameter below represents a Field Display Policy applied to relation/LineRelation from a Site administrator user menu.
&policy_name=LineMenuFDPSite
Line breaks have been added to console output in the examples for better formatting.
In this example, we create a single instance of relation/LineRelation.
POST an instance of relation/LineRelation.
Site Administrator
Represents the model instance details
{ "data": { "partyEntranceTone": "Default", "cfaCssPolicy": "Use System Default", "autoAnswer": "Auto Answer Off", "callForwardNotRegisteredInt": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "routePartitionName": "Site-locus1", "callForwardOnFailure": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "shareLineAppearanceCssName": "Intl24HrsEnh-locus1", "callForwardBusy": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "pattern": "90217", "patternPrecedence": "Default", "callForwardNoAnswer": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "callForwardNoCoverage": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "callForwardNotRegistered": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "usage": "Device", "alertingName": "techsupport", "enterpriseAltNum": { "isUrgent": false, "addLocalRoutePartition": false, "advertiseGloballyIls": true ... }
$ curl -v -H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==' -H 'Content-Type:application/json' --data-binary @post-payload.json -X POST 'http://localhost/api/relation/LineRelation/ ?hierarchy=55b9dc81a6165413b9d16ab6&policy_name=LineMenuFDPSite&template_name=line-cft&nowait=true&format=json' + About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > POST /api/relation/LineRelation/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name=LineMenuFDPSite&template_name= line-cft&nowait=true&format=json HTTP/1.1 > Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA== > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */* > Content-Type:application/json > Content-Length: 1941 > Expect: 100-continue
POST /api/relation/LineRelation |
Requested API operation. |
hierarchy=55b9dc81a6165413b9d16ab6 |
Hierarchy at which the POST is performed. |
template_name=line-cft |
ConfigurationTemplate name. |
policy_name=LineMenuFDPSite |
FieldDisplayPolicy name. |
nowait=true |
Perform the operation asynchronously. |
format=json |
Request a json response body. |
< HTTP/1.1 100 Continue < HTTP/1.1 202 ACCEPTED < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 13:10:46 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, DELETE, HEAD, OPTIONS < X-CSRFToken: d2q7nV4aWDWFpuazsnRvJVMcj9qX5Ksg < Set-Cookie: csrftoken=d2q7nV4aWDWFpuazsnRvJVMcj9qX5Ksg;httponly; Path=/ < Set-Cookie: sessionid=hahbo0wy7sa8u8rfaiz2tcqxvkvwshp8;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 {"href": "/api/tool/Transaction/aff36c0b-ff6a-431b-be58-d2f636edb7cd/", "success": true, "transaction_id": "aff36c0b-ff6a-431b-be58-d2f636edb7cd"}
HTTP/1.1 202 ACCEPTED |
The request was accepted and is being processed. If this were a successful synchronous request, the HTTP response would have been 201 CREATED. |
"transaction_id": "aff36c0b-ff6a-431b-be58-d2f636edb7cd" |
The operation's transaction id. |
"success" : true |
The request was successfully posted. |
In this example, we retrieve instances of relation/LineRelation.
GET instances of relation/LineRelation.
Site Administrator
No body is necessary when retrieving an instance.
$ curl -v -H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==' -X GET 'http://localhost/api/relation/LineRelation/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name =LineMenuFDPSite&template_name=line-cft&format=json' * About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > GET /api/relation/LineRelation/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name=LineMenuFDPSite&template_name =line-cft&format=json HTTP/1.1 > Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA== > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */*
GET /api/relation/LineRelation/ |
Requested API operation. If the PKID were included here, then only that single instance would be retrieved |
hierarchy=55b9dc81a6165413b9d16ab6 |
Hierarchy at which the operation is performed |
template_name=line-cft |
ConfigurationTemplate name |
policy_name=LineMenuFDPSite |
FieldDisplayPolicy name |
format=json |
Request a json response body |
< HTTP/1.1 200 OK < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 13:31:00 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS < X-CSRFToken: a6fFDYZyk9ET8K8xTq9HITFrRi8TROrV < Set-Cookie: csrftoken=a6fFDYZyk9ET8K8xTq9HITFrRi8TROrV;httponly;Path=/ < Set-Cookie: sessionid=9i0w39d1d32mdx6fs2skl564y8pmhmu9;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 { ... "data": { "pattern": "90124", "patternPrecedence": "Default", "callForwardNoAnswer": { "destination": null, "forwardToVoiceMail": false, "callingSearchSpaceName": null }, "hrInterval": null, "callForwardNoCoverage": { "destination": null, "forwardToVoiceMail": false, "callingSearchSpaceName": null }, "callForwardNotRegistered": { "destination": null, "forwardToVoiceMail": false, "callingSearchSpaceName": null }, "usage": "Device", "summary_device": "10.120.2.216, 8443, prov1.cust1", "hrDuration": null, "parkMonForwardNoRetrieveVmEnabled": false, "alertingName": "Helpdesk", "description": "DN created without device from QAS.", "directoryURIs": null, "aarVoiceMailEnabled": false, "hierarchy_path": "sys.prov1.cust1.locus1", "parkMonForwardNoRetrieveIntCssName": null, "parkMonForwardNoRetrieveDn": null, "allowCtiControlFlag": true, "defaultActivatedDeviceName": null, "parkMonReversionTimer": null, "releaseClause": "No Error", "e164AltNum": { "numMask": null, "addLocalRoutePartition": false, "advertiseGloballyIls": false, "routePartition": null, "isUrgent": false }, "callForwardAll": { ... }
HTTP/1.1 200 OK |
The request was accepted and processed. |
In this example, we update a single instance of relation/LineRelation.
PUT an instance of relation/LineRelation.
Site Administrator
Represents the requested model instance details. Note the updated alertingName value of "Helpdesk".
{ "data": { "partyEntranceTone": "Default", "cfaCssPolicy": "Use System Default", "autoAnswer": "Auto Answer Off", "callForwardNotRegisteredInt": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "routePartitionName": "Site-locus1", "callForwardOnFailure": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "shareLineAppearanceCssName": "Intl24HrsEnh-locus1", "callForwardBusy": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "pattern": "90217", "patternPrecedence": "Default", "callForwardNoAnswer": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "callForwardNoCoverage": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "callForwardNotRegistered": { "callingSearchSpaceName": "Intl24HrsEnh-locus1" }, "usage": "Device", "alertingName": "techsupport", "enterpriseAltNum": { "isUrgent": false, "addLocalRoutePartition": false, "advertiseGloballyIls": true ... }
$ curl -v -H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==' -H 'Content-Type:application/json' --data-binary @put-payload.json -X PUT 'http://localhost/api/relation/LineRelation/55b9fe59a6165413b9d17628/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name=LineMenuFDPSite&template_name=line-cft&nowait=true&format=json' + About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > PUT /api/relation/LineRelation/55b9fe59a6165413b9d17628/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name=LineMenuFDPSite&template_name=line-cft&nowait=true&format=json HTTP/1.1 > Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA== > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */* > Content-Type:application/json > Content-Length: 1926 > Expect: 100-continue
PUT /api/relation/LineRelation/55b9fe59a6165413b9d17628 |
Requested API operation |
55b9fe59a6165413b9d17628 |
PKID of the model instance to update (from the POST example) |
hierarchy=55b9dc81a6165413b9d16ab6 |
Hierarchy at which the operation is performed |
template_name=line-cft |
ConfigurationTemplate name |
policy_name=LineMenuFDPSite |
FieldDisplayPolicy name |
nowait=true |
Perform the operation asynchronously |
format=json |
Request a json response body |
< HTTP/1.1 100 Continue < HTTP/1.1 202 ACCEPTED < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 13:00:33 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS < X-CSRFToken: GgxBBhTjkB2IUib2lHgIVzeohhmK2arc < Set-Cookie: csrftoken=GgxBBhTjkB2IUib2lHgIVzeohhmK2arc;httponly;Path=/ < Set-Cookie: sessionid=8skxwiqojuyz5xl37cdcflbr5ct5ncrk;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 {"href": "/api/tool/Transaction/0bebcaa2-df37-420f-bd15-3a00ea056092/", "success": true, "transaction_id": "0bebcaa2-df37-420f-bd15-3a00ea056092"}
HTTP/1.1 202 ACCEPTED |
The request was accepted and is being processed. If this were a successful synchronous request, the HTTP response would have been 204 NO CONTENT |
"transaction_id": "0bebcaa2-df37-420f-bd15-3a00ea056092" |
The operation's transaction id |
"success" : true |
The request was successfully posted |
In this example, we delete a single instance of relation/LineRelation.
DELETE an instance of relation/LineRelation.
Site Administrator
No body is necessary when deleting a single instance. If the intent is to delete multiple instances, a json body may be included which containing the hrefs of the target instances.
$ curl -v -H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==' -X DELETE 'http://localhost/api/relation/LineRelation/55ba2482a6165413b9d19fb8/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name =LineMenuFDPSite&template_name=line-cft&nowait=true&format=json' * About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > DELETE /api/relation/LineRelation/55ba2482a6165413b9d19fb8/?hierarchy=55b9dc81a6165413b9d16ab6&policy_name =LineMenuFDPSite&template_name=line-cft&nowait=true&format=json HTTP/1.1 > Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA== > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */*
DELETE /api/relation/LineRelation/55b9fe59a6165413b9d17628 |
Requested API operation |
55b9fe59a6165413b9d17628 |
PKID of the model instance to update (from the POST example) |
hierarchy=55b9dc81a6165413b9d16ab6 |
Hierarchy at which the operation is performed |
template_name=line-cft |
ConfigurationTemplate name |
policy_name=LineMenuFDPSite |
FieldDisplayPolicy name |
nowait=true |
Perform the operation asynchronously |
format=json |
Request a json response body |
< HTTP/1.1 202 ACCEPTED < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 13:21:00 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS < X-CSRFToken: a6fFDYZyk9ET8K8xTq9HITFrRi8TROrV < Set-Cookie: csrftoken=a6fFDYZyk9ET8K8xTq9HITFrRi8TROrV;httponly;Path=/ < Set-Cookie: sessionid=9i0w39d1d32mdx6fs2skl564y8pmhmu9;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 {"href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/", "success": true, "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd"}
HTTP/1.1 202 ACCEPTED |
The request was accepted and is being processed. If this were a successful synchronous request, the HTTP response would have been 204 NO CONTENT |
"transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" |
The operation's transaction id |
"success" : true |
The request was successfully posted |
In this example, we create a several instances of relation/LineRelation with one request through the bulk load mechanism. The bulk load mechanism consists of first uploading the prospective instances in a spreadsheet and then executing the bulkload operation on the uploaded file.
Upload the bulkload file (spreadsheet).
Provider Administrator.
Contains the details of the requested instances.
|
|
|
|
|
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Upload the bulkload file (spreadsheet).
Provider Administrator.
Contains the details of the requested instances.
# Hierarchy Node |
# Device |
# CFT Template |
# Directory Number |
# Alerting Name |
---|---|---|---|---|
sys.prov1.cust1.locus1 |
10.120.2.216, 8443, prov1.cust1 |
line-cft |
90218 |
techsupport |
sys.prov1.cust1.locus1 |
10.120.2.216, 8443, prov1.cust1 |
line-cft |
90219 |
techsupport |
sys.prov1.cust1.locus1 |
10.120.2.216, 8443, prov1.cust1 |
line-cft |
90220 |
techsupport |
sys.prov1.cust1.locus1 |
10.120.2.216, 8443, prov1.cust1 |
line-cft |
90221 |
techsupport |
sys.prov1.cust1.locus1 |
10.120.2.216, 8443, prov1.cust1 |
line-cft |
90222 |
techsupport |
$ curl -v -H 'Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk' -F uploadedfile='@LineRelation.xlsx' 'http://localhost/api/uploadfiles/?hierarchy=55b9daeca6165413b9d166de' * About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > POST /api/uploadfiles/?hierarchy=55b9daeca6165413b9d166de HTTP/1.1 > Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */* > Content-Length: 10455 > Expect: 100-continue > Content-Type: multipart/form-data;boundary=----------------------------5a0f36378f19
POST /api/uploadfiles |
Requested API operation |
hierarchy=55b9daeca6165413b9d166de |
Hierarchy at which the POST is performed |
< HTTP/1.1 100 Continue < HTTP/1.1 200 OK < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 15:09:25 GMT < Content-Type: text/html; charset=utf-8 < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept-Encoding < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: POST, OPTIONS < X-CSRFToken: C4ceiFEWSbjif1O4Jzhr1gZV9ytd9f2F < Set-Cookie: csrftoken=C4ceiFEWSbjif1O4Jzhr1gZV9ytd9f2F;httponly;Path=/ < Set-Cookie: sessionid=07z03pbatb1qelahcc01ygufgzsr6i35;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 {"uploadedfiles": [ {"name": "LineRelation.xlsx", "id": "55ba3e25a616541bb906b209" } ] }
HTTP/1.1 200 OK |
The request was accepted the file was uploaded. |
Execute the bulkload operation on the uploaded spreadsheet.
Provider Administrator.
Indicates the target bulk load spreadsheet
{"bulkload_file" : "LineRelation.xlsx","execute_immediately":true}
$ curl -v -H 'Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary '{"bulkload_file":"LineRelation.xlsx","execute_immediately":true}' -X POST 'http://localhost/api/tool/BulkLoad/?hierarchy=55b9daeca6165413b9d166de&method=bulkload_spreadsheet&nowait=true&format=json' + About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > POST /api/tool/BulkLoad/?hierarchy=55b9daeca6165413b9d166de&method=bulkload_spreadsheet&nowait=true&format=json HTTP/1.1 > Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Content-Type: application/json > accept: application/json > Content-Length: 64 > + upload completely sent off: 64out of 64 bytes
POST /api/tool/BulkLoad |
Requested API operation |
hierarchy=55b9daeca6165413b9d166de |
Hierarchy at which the POST is performed |
method=bulkload_spreadsheet |
Bulk load via spreadsheet |
nowait=true |
Execute the operation asynchronously |
< HTTP/1.1 202 ACCEPTED < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 14:51:22 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, HEAD, OPTIONS < X-CSRFToken: iFh5q8FUBxoXyyiLcELHoO8W5IDFbAiP < Set-Cookie: csrftoken=iFh5q8FUBxoXyyiLcELHoO8W5IDFbAiP;httponly;Path=/ < Set-Cookie: sessionid=3ayny2y73i43u6sj9bdyoawhhtr8wbm8;httponly;Path=/ < + Connection #0 to host localhost left intact + Closing connection #0 {"href": "/api/tool/Transaction/16e1e599-494a-4898-944a-0528915d2f42/", "success": true, "transaction_id": "16e1e599-494a-4898-944a-0528915d2f42"}
HTTP/1.1 202 ACCEPTED |
The request was accepted and the operation is processing. |
"transaction_id" : "16e1e599-494a-4898-944a-0528915d2f42" |
The operation's transaction id |
In this example, we export a single instance of relation/LineRelation to a formatted .xlsx spreadsheet file.
GET an exported instance of a relation/LineRelation.
Provider Administrator
No input body is necessary to export an instance.
$ curl -v -H 'Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk' -o 55ba3e55a6165413b9d1a18d.xlsx 'http://localhost/api/relation/LineRelation/55ba3e55a6165413b9d1a18d/export/?hierarchy=55b9daeca6165413b9d166de&export _format=xlsx&template_name=line-cft&policy_name=LineMenuFDPProv&schema=true&schema_rules=true' + About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... > GET /api/relation/LineRelation/55ba3e55a6165413b9d1a18d/export/?hierarchy=55b9daeca6165413b9d166de&export _format=xlsx&template_name=line-cft&policy_name=LineMenuFDPProv&schema=true&schema_rules=true HTTP/1.1 > Authorization: Basic YWRtaW5AcHJvdjEuY29tOnBhc3N3b3Jk > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */* >
GET /api/relation/LineRelation/55ba3e55a6165413b9d1a18d/export |
Requested API operation |
55ba3e55a6165413b9d1a18d |
PKID of the instance to export |
hierarchy=55b9daeca6165413b9d166de |
Hierarchy at which the operation is performed |
template_name=line-cft |
ConfigurationTemplate name |
policy_name=LineMenuFDPProv |
FieldDisplayPolicy name |
export_format=xlsx |
Requested format of the exported instance |
schema=true |
Include model schema details |
schema_rules=true |
Include model schema rules |
< HTTP/1.1 200 OK < Server: nginx/1.1.19 < Date: Thu, 30 Jul 2015 15:45:05 GMT < Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet < Transfer-Encoding: chunked < Connection: keep-alive < X-CSRFToken: tey9Z6fdlDtwEMYczJ2UmSleIolfG4ys < Content-Disposition: attachment;filename=relation_LineRelation_exportedsheet_formatted_2015-07-30_17-45-03.xlsx < Content-Language: en-us < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Allow: GET, HEAD, OPTIONS < Set-Cookie: fileDownloadToken=downloaded; Path=/ < Set-Cookie: csrftoken=tey9Z6fdlDtwEMYczJ2UmSleIolfG4ys;httponly;Path=/ < Set-Cookie: sessionid=aioz1ykt36ht47fzthjpljektbg1z1yr;httponly;Path=/ < [data not shown] + Connection #0 to host localhost left intact + Closing connection #0
HTTP/1.1 200 OK |
The request was successful |
Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
Format of the response body |
Content-Disposition: attachment;filename=relation_LineRelation_exportedsheet_formatted_2015-07-30_17-45-03.xlsx |
Export body filename |
In this example, we retrieve details from a posted transaction.
GET a tool/Transaction instance.
Site Administrator
No body is necessary when retrieving a transaction instance.
curl -v -H 'Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==' 'http://localhost/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/?hierarchy =55b9dc81a6165413b9d16ab6&nowait=true&format=json' + About to connect() to localhost port 80 (#0) + Trying 127.0.0.1... connected > GET /api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/?hierarchy=55b9dc81a6165413b9d16ab6&format=json HTTP/1.1 > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: localhost > Accept: */* > Authorization: Basic YWRtaW5AbG9jdXMxLmNvbTpwYXNzd29yZA==
GET /api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd |
Requested API operation. Note that 01de8720-d627-4e53-8e1b-e1ad66edb7bd represents the transaction from the Delete example |
hierarchy=55b9dc81a6165413b9d16ab6 |
Hierarchy at which the operation is performed |
format=json |
Request a json response body |
< HTTP/1.1 200 OK < Server: nginx/1.1.19 < Date: Fri, 31 Jul 2015 11:44:27 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Connection: keep-alive < Vary: Accept, Cookie, Accept-Language, X-CSRFToken < Content-Language: en-us < Allow: GET, POST, HEAD, OPTIONS < X-CSRFToken: pcWhI6fzSbevYskrNVcP34JDZOWH6Nti < Set-Cookie: csrftoken=pcWhI6fzSbevYskrNVcP34JDZOWH6Nti;httponly;Path=/ < Set-Cookie: sessionid=nyoefznzm1qy9t51qq6v2x0vgkmbvbij;httponly;Path=/ < { ... "data": { "username": "admin", "status": "Success", "rolled_back": "No", "resource": { "hierarchy": "sys.prov1.cust1.locus1", "model_type": "relation/LineRelation", "current_state": "/api/relation/LineRelation/55ba2482a6165413b9d19fb8/ Entity", "pkid": "55ba2482a6165413b9d19fb8" }, "log": [ { "severity": "info", "format": "text", "log_id": "55ba24bea6165413b9d19fcd", "href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/log/?log_id=55ba24bea6165413b9d19fcd", "time": "2015-07-30T13:21:02.637000", "message": "Step 2 - End", "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" }, { "severity": "info", "format": "text", "log_id": "55ba24bea6165413b9d19fcc", "href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/log/?log_id=55ba24bea6165413b9d19fcc", "time": "2015-07-30T13:21:02.637000", "message": "Step 2 - Condition unmet, skipping step. \n[\n ..(SNIPPED) "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" }, { "severity": "info", "format": "text", "log_id": "55ba24bea6165413b9d19fcb", "href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/log/?log_id=55ba24bea6165413b9d19fcb", "time": "2015-07-30T13:21:02.609000", "message": "Step 2 - Start update data/InternalNumberInventory\nat hierarchy level ..(SNIPPED) "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" }, { "severity": "info", "format": "text", "log_id": "55ba24bea6165413b9d19fca", "href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/log/?log_id=55ba24bea6165413b9d19fca", "time": "2015-07-30T13:21:02.605000", "message": "Step 1 - End", "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" }, { "severity": "info", "format": "text", "log_id": "55ba24bda6165413b9d19fc5", "href": "/api/tool/Transaction/01de8720-d627-4e53-8e1b-e1ad66edb7bd/log/?log_id=55ba24bda6165413b9d19fc5", "time": "2015-07-30T13:21:01.280000", "message": "Step 1 - Start remove device/cucm/Line\nat hierarchy level sys.prov1.cust1.locus1", "transaction_id": "01de8720-d627-4e53-8e1b-e1ad66edb7bd" }, ... }
HTTP/1.1 200 OK |
The request was accepted and processed. |