Actually, I closely followed the Swagger, which has this example:
{
"id": 0,
"title": "string",
"description": "string",
"createdTime": "2024-07-17T08:07:20.704Z",
"createdBy": "string",
"job": {
"id": 0,
"createdTime": "2024-07-17T08:07:20.704Z",
"startTime": "2024-07-17T08:07:20.704Z",
"endTime": "2024-07-17T08:07:20.704Z",
"status": 0,
"output": "string",
"script": {
"id": 0,
"name": "string",
"oldName": "string",
"description": "string",
"createdTime": "2024-07-17T08:07:20.704Z",
"manualTime": 0,
"timeOut": 0,
"commitId": "string",
"content": "string",
"scriptParameters": [
{
"id": 0,
"name": "string",
"displayName": "string",
"type": "string",
"script": "string",
"defaultValue": "string",
"required": true,
"displayType": 0,
"validValues": [
"string"
],
"helpText": "string",
"parameterSet": "string",
"resolvedDefaultValue": "string",
"iValidateSetValuesGenerator": "string",
"using": "string"
}
],
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"status": 0,
"tag": [
{
"id": 0,
"name": "string",
"color": "string",
"description": "string",
"editable": true,
"readOnly": true
}
],
"fullPath": "string",
"requiredPowerShellVersion": "string",
"environment": "string",
"errorAction": 0,
"informationAction": 0,
"verbose": true,
"debug": true,
"commitNotes": "string",
"disableManualInvocation": true,
"maxHistory": 0,
"concurrentJobs": 0,
"credential": "string",
"accessControls": 0,
"retryLimit": 0,
"anonymous": true,
"discardPipeline": true,
"longDescription": "string",
"links": [
"string"
],
"examples": [
{
"title": "string",
"code": "string",
"description": "string"
}
],
"defaultParameterSet": "string",
"loadProfile": true,
"workingDirectory": "string",
"parameterSets": [
"string"
],
"folder": "string",
"oldFolder": "string",
"readOnly": true,
"resolvedPath": "string",
"module": "string",
"command": "string",
"role": [
"string"
],
"previousContent": "string"
},
"isScriptDeleted": true,
"scriptFullPath": "string",
"scriptCommitId": "string",
"appToken": {
"id": 0,
"token": "string",
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"revoked": true,
"role": "string",
"created": "2024-07-17T08:07:20.705Z",
"expiration": "2024-07-17T08:07:20.705Z",
"revokedDate": "2024-07-17T08:07:20.705Z",
"createdBy": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"description": "string",
"lastUsed": "2024-07-17T08:07:20.705Z"
},
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"parentJob": "string",
"parentLineNumber": 0,
"debug": true,
"computerName": "string",
"port": 0,
"processId": 0,
"memoryBytes": 0,
"runspaceId": 0,
"activity": "string",
"currentOperation": "string",
"percentComplete": 0,
"secondsRemaining": 0,
"statusDescription": "string",
"environment": "string",
"agent": {
"id": 0,
"name": "string",
"heartBeat": "2024-07-17T08:07:20.705Z",
"status": 0,
"grpcPort": 0,
"loadingInfo": "string",
"maintenance": true,
"deleted": true,
"loginErrorMessage": "string",
"tags": [
{
"id": 0,
"name": "string",
"value": "string",
"static": true,
"computer": "string"
}
],
"hangfireServerId": "string",
"hangfireWorkerCounter": 0,
"version": "string"
},
"computer": {
"id": 0,
"name": "string",
"heartBeat": "2024-07-17T08:07:20.705Z",
"status": 0,
"grpcPort": 0,
"loadingInfo": "string",
"maintenance": true,
"deleted": true,
"loginErrorMessage": "string",
"tags": [
{
"id": 0,
"name": "string",
"value": "string",
"static": true,
"computer": "string"
}
],
"hangfireServerId": "string",
"hangfireWorkerCounter": 0,
"version": "string"
},
"errorAction": 0,
"children": [
"string"
],
"jobOutput": [
{
"id": 0,
"message": "string",
"type": 0,
"data": "string",
"job": "string",
"timestamp": "2024-07-17T08:07:20.705Z",
"jobId": 0
}
],
"parameters": [
{
"id": 0,
"name": "string",
"displayName": "string",
"type": "string",
"job": "string",
"value": "string",
"variable": {
"id": 0,
"name": "string",
"value": "string",
"userName": "string",
"password": "string",
"secret": true,
"vault": "string",
"type": "string",
"description": "string",
"missingSecret": true,
"disableRunAsSupport": true,
"deleteSecret": true,
"readOnly": true,
"database": true,
"role": [
"string"
],
"force": true
},
"isVariable": true,
"displayType": 0,
"jsonData": "string",
"file": {
"id": 0,
"fileName": "string",
"content": "string",
"jobParameter": "string",
"jobPipelineOutput": "string"
},
"fileId": 0,
"formValue": "string"
}
],
"notes": "string",
"credential": "string",
"scheduleId": 0,
"triggered": true,
"trigger": "string",
"accessToken": "string",
"idToken": "string",
"retryCount": 0,
"tags": "string",
"schedule": "string",
"archived": true,
"batch": true,
"runId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": "string",
"refreshToken": "string",
"jobFeedbacks": [
{
"id": 0,
"data": "string",
"message": "string",
"complete": true,
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"job": "string",
"secure": true
}
],
"notifications": [
"string"
],
"jobPipelineOutputs": [
{
"id": 0,
"data": "string",
"jsonData": "string",
"job": "string",
"file": {
"id": 0,
"fileName": "string",
"content": "string",
"jobParameter": "string",
"jobPipelineOutput": "string"
},
"fileId": 0
}
]
},
"script": {
"id": 0,
"name": "string",
"oldName": "string",
"description": "string",
"createdTime": "2024-07-17T08:07:20.705Z",
"manualTime": 0,
"timeOut": 0,
"commitId": "string",
"content": "string",
"scriptParameters": [
{
"id": 0,
"name": "string",
"displayName": "string",
"type": "string",
"script": "string",
"defaultValue": "string",
"required": true,
"displayType": 0,
"validValues": [
"string"
],
"helpText": "string",
"parameterSet": "string",
"resolvedDefaultValue": "string",
"iValidateSetValuesGenerator": "string",
"using": "string"
}
],
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"status": 0,
"tag": [
{
"id": 0,
"name": "string",
"color": "string",
"description": "string",
"editable": true,
"readOnly": true
}
],
"fullPath": "string",
"requiredPowerShellVersion": "string",
"environment": "string",
"errorAction": 0,
"informationAction": 0,
"verbose": true,
"debug": true,
"commitNotes": "string",
"disableManualInvocation": true,
"maxHistory": 0,
"concurrentJobs": 0,
"credential": "string",
"accessControls": 0,
"retryLimit": 0,
"anonymous": true,
"discardPipeline": true,
"longDescription": "string",
"links": [
"string"
],
"examples": [
{
"title": "string",
"code": "string",
"description": "string"
}
],
"defaultParameterSet": "string",
"loadProfile": true,
"workingDirectory": "string",
"parameterSets": [
"string"
],
"folder": "string",
"oldFolder": "string",
"readOnly": true,
"resolvedPath": "string",
"module": "string",
"command": "string",
"role": [
"string"
],
"previousContent": "string"
},
"dashboard": {
"id": 0,
"name": "string",
"filePath": "string",
"baseUrl": "string",
"environment": "string",
"processId": 0,
"processName": "string",
"status": 0,
"authenticated": true,
"role": [
"string"
],
"content": "string",
"grantAppToken": true,
"debug": true,
"disableAutoStart": true,
"disableStartupLog": true,
"sessionTimeout": 0,
"idleTimeout": 0,
"deployed": true,
"autoDeploy": true,
"description": "string",
"credential": "string",
"disableErrorToast": true,
"maintenance": true,
"tag": [
{
"id": 0,
"name": "string",
"color": "string",
"description": "string",
"editable": true,
"readOnly": true
}
],
"template": "string",
"readOnly": true,
"verboseErrorMessages": true,
"disableInteractiveHost": true,
"module": "string",
"command": "string",
"favIcon": "string",
"accessControls": 0,
"hidden": true,
"adminConsole": true,
"onSessionTimeout": "string",
"computerGroup": [
"string"
],
"startTime": "2024-07-17T08:07:20.705Z",
"deployTime": "2024-07-17T08:07:20.705Z",
"dashboardContent": {
"id": 0,
"title": "string",
"theme": {},
"content": "string"
}
},
"license": {
"id": 0,
"licenseText": "string",
"licensee": "string",
"startDate": "2024-07-17T08:07:20.705Z",
"endDate": "2024-07-17T08:07:20.705Z",
"seats": 0,
"product": "string",
"status": "string",
"developer": true,
"readOnly": true
},
"identity": {
"id": 0,
"name": "string",
"source": 0,
"role": {
"id": 0,
"name": "string",
"description": "string",
"policy": "string",
"claimType": "string",
"claimValue": "string",
"disabled": true,
"readOnly": true,
"defaultRoute": "string",
"roles": [
"string"
]
},
"roleName": "string",
"roles": [
"string"
],
"credentialVault": "string",
"password": "string",
"localAccount": true,
"oldPassword": "string",
"settings": "string"
},
"level": 0,
"viewed": true
}
And I really think that the error is not coming from my call because the status returned by the server is 500…
Finally, the GET method returns this kind of object:
{
"id": 1597,
"title": "Invalid configuration: C:\ProgramData\UniversalAutomation\Repository\.universal\roles.ps1",
"description": "Cannot bind argument to parameter 'ClaimValue' because it is an empty string.",
"createdTime": "2024-07-17T06:28:21.1744122Z",
"createdBy": null,
"job": null,
"script": null,
"dashboard": null,
"license": null,
"identity": null,
"level": 2,
"viewed": false
}
So I really don’t understand why it’s not working…