cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1362
Views
1
Helpful
1
Replies

not getting "configid" when trying to get workflow details

sudmekal
Cisco Employee
Cisco Employee

get_workflow = get('onboarding/pnp-workflow', params = {"name" : "FGE18480PFB-FRETTA"})
2018-09-03T19:39:29: %SCRIPT-INFO:
2018-09-03T19:39:29: %SCRIPT-INFO: GET_URL: onboarding/pnp-workflow
2018-09-03T19:39:29: %SCRIPT-INFO: GET_PARAMS_IF_ANY: {'name': 'FGE18480PFB-FRETTA'}
2018-09-03T19:39:29: %SCRIPT-INFO:
2018-09-03T19:39:29: %SCRIPT-INFO: GET_output_content
2018-09-03T19:39:29: %SCRIPT-INFO: [
2018-09-03T19:39:29: %SCRIPT-INFO: {
2018-09-03T19:39:29: %SCRIPT-INFO: "addToInventory": true,
2018-09-03T19:39:29: %SCRIPT-INFO: "addedOn": 1535610215183,
2018-09-03T19:39:29: %SCRIPT-INFO: "currTaskIdx": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "description": "",
2018-09-03T19:39:29: %SCRIPT-INFO: "endTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "execTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "id": "5b878d671955e100077548df",
2018-09-03T19:39:29: %SCRIPT-INFO: "lastupdateOn": 1535610215183,
2018-09-03T19:39:29: %SCRIPT-INFO: "name": "FGE18480PFB-FRETTA",
2018-09-03T19:39:29: %SCRIPT-INFO: "startTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "tasks": [
2018-09-03T19:39:29: %SCRIPT-INFO: {
2018-09-03T19:39:29: %SCRIPT-INFO: "currWorkItemIdx": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "endTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "imageDownloadInfo": [
2018-09-03T19:39:29: %SCRIPT-INFO: {
2018-09-03T19:39:29: %SCRIPT-INFO: "imageId": "80fe725e-fef4-4864-b038-252e85e2649c",
2018-09-03T19:39:29: %SCRIPT-INFO: "imageUrl": null,
2018-09-03T19:39:29: %SCRIPT-INFO: "reload": true
2018-09-03T19:39:29: %SCRIPT-INFO: }
2018-09-03T19:39:29: %SCRIPT-INFO: ],
2018-09-03T19:39:29: %SCRIPT-INFO: "name": "Image Download",
2018-09-03T19:39:29: %SCRIPT-INFO: "startTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "taskSeqNo": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "timeTaken": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "type": "ImageDownload"
2018-09-03T19:39:29: %SCRIPT-INFO: },
2018-09-03T19:39:29: %SCRIPT-INFO: {
2018-09-03T19:39:29: %SCRIPT-INFO: "configInfo": {
2018-09-03T19:39:29: %SCRIPT-INFO: "configFileUrl": null,
2018-09-03T19:39:29: %SCRIPT-INFO: "configId": null,
2018-09-03T19:39:29: %SCRIPT-INFO: "configParameters": null,
2018-09-03T19:39:29: %SCRIPT-INFO: "connLossRollBack": true,
2018-09-03T19:39:29: %SCRIPT-INFO: "fileServiceId": "8f4b9a96-5b6a-4a04-9918-c53b4cb63acc",
2018-09-03T19:39:29: %SCRIPT-INFO: "saveToStartUp": true
2018-09-03T19:39:29: %SCRIPT-INFO: },
2018-09-03T19:39:29: %SCRIPT-INFO: "currWorkItemIdx": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "endTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "name": "Config Download",
2018-09-03T19:39:29: %SCRIPT-INFO: "startTime": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "taskSeqNo": 1,
2018-09-03T19:39:29: %SCRIPT-INFO: "timeTaken": 0,
2018-09-03T19:39:29: %SCRIPT-INFO: "type": "Config"
2018-09-03T19:39:29: %SCRIPT-INFO: }
2018-09-03T19:39:29: %SCRIPT-INFO: ],
2018-09-03T19:39:29: %SCRIPT-INFO: "tenantId": "5b59b8dd74a437008e9e5a5f",
2018-09-03T19:39:29: %SCRIPT-INFO: "type": "Standard",
2018-09-03T19:39:29: %SCRIPT-INFO: "useState": "InUse",
2018-09-03T19:39:29: %SCRIPT-INFO: "version": 1
2018-09-03T19:39:29: %SCRIPT-INFO: }
2018-09-03T19:39:29: %SCRIPT-INFO: ]

1 Reply 1

aradford
Cisco Employee
Cisco Employee

Ok...  a couple of things:

 

1) The workflowId is in the payload above.  It is "5b878d671955e100077548df"

2) You are using a static file, not a template, so you do not need the configFileID as that is in the workflow and there are no variables.

3) You need to do a lookup of the serial number of the device to get the deviceId to add.  GET /api/v1/onboarding/pnp-device?serialNumber=XXXXXX   You will need to capture the Id = DDDDD

 

Once you have this, you should be able to create a simple playload to POST to claim the device.

 

{"deviceClaimList":[{"deviceId":"DDDDD","configList":[]}],"projectId":null,"workflowId":"5b878d671955e100077548df","configId":null,"imageId":null,"populateInventory":true}

(replacing "DDDDD" with the correct deviceId)