Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The credentials API provides functionality that allows a administrator to add, delete or update credentials

Table of Contents

Section

Get all credentials

Lists all the credentials configured in the Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/credentials

Pagination query string parameters


Section

Get all credentials, filtered

Lists credentials configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/credentials/getAll

Pagination query string parameters

Filters: The connector credential filter definition here

Response

Code Block
languagejs
{
    "count": {
        "totalItems": 1
    },
    "credential": [
        {
            "id": "40b305ea-77e1-4874-aa28-964b1cf4a1a8",
            "type": "filesystem",
            "description": "xxxx",
            "throttlePolicy": "10653921-1b27-40b5-9d7a-f54ef1e3ad01",
            "properties": {
                "domain": "xxxx",
                "user": "xxxx",
                "password": "xxxx"
            }
        }
    ]
}

Status: 200



Section

Get a single credential

Get information about a single credential configured in Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/credentials/:id


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the credential to return


Response

Code Block
languagejs
{
    "credential": {
        "id": "40b305ea-77e1-4874-aa28-964b1cf4a1a8",
        "type": "filesystem",
        "description": "xxxx",
        "throttlePolicy": "10653921-1b27-40b5-9d7a-f54ef1e3ad01",
        "properties": {
            "domain": "xxxx",
            "user": "xxxx",
            "password": "xxxx"
        }
    }
}

Status: 200, 404




Section

Add credential(s)

Adds credentials to Aspire, this endpoint need the at least the OPERATOR  ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
POST /aspire/_api/credentials


Body Parameters

NameTypeRequiredDescription
typestringRequiredThe type of credential to add
descriptionstringRequiredAn optional description of the credential
throttlePolicystringOptionalThe throttle policy id
propertiesstringRequiredCredential properties


Example

Code Block
languagejs
POST /aspire/_api/credentials
[{
    "type": "filesystem",
    "description": "Europe Net Appliancexxxx",
  "throttlePolicy": "throttlePolicyId",
   "properties": { This
 will be a dynamic JSON object } 
},
{
  "type"domain": "sharepointxxxx",
        "descriptionuser": "SP Onlinexxxx",
  "properties": { This will be a dynamic JSON object } 
}]      "password": "xxxx"
    }
}


Response

Code Block
languagejs
{
    "credential": [
        {
            "id": "AAABcID5GBc=43d1a498-c672-46b7-902f-082222122481",
            "type": "filesystem",
            "description": "Europe Net Appliancexxxx",
      "created": 1596707252548,
    "updated": 1596707252548,
	"properties": {
 This will be a dynamic JSON object }  
   },
   {
    "iddomain": "AAABcIueWUc=xxxx",
                "typeuser": "sharepointxxxx",
    "description": "SP Online",
       "created": 1596707252548,
    "updatedpassword": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }xxxx"
            }
        }
    ]
}

See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors

Status: 201, 406




Section

Update credential(s)

Update credentials in Aspire, this endpoint need the at least the OPERATOR needs the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/credentials/:id

PUT /aspire/_api/credentials

Note
The existing document will be replaced by the new one provided in the body

Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update...
descriptionstringxThe description of the credential
propertiesobjectxCredential properties
throttlePolicystringxThe throttle policy id

x - at least one field must be present+ fields from "Add" section...

Example - update more credentials

Code Block
languagejs
PUT /aspire/_api/credentials
{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "typethrottlePolicy": "filesystem10653921-1b27-40b5-9d7a-f54ef1e3ad01"
    "description": "Europe Net Appliance"
  },
  "AAABcIueWUcAAABcID5GBd=": {
    "id": "AAABcIueWUcAAABcID5GBd=",
    "typeproperties": "sharepoint"
{
       "descriptiondomain": "SP Onlinexxxx",
  }
}

Response

Code Block
languagejs
{
  "credential": [{
    "iduser": "AAABcID5GBc=xxxx",
    "type": "filesystem"
    "descriptionpassword": "Europe Net Appliancexxxx",
	"properties": { This will be a dynamic JSON object }  
   },
   {
    "id": "AAABcIueWUc=",
    "type": "sharepoint"
    "description": "SP Online",
	"properties": { This will be a dynamic JSON object }  
  }]
}
See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors

}


Response

Code Block
languagejs
{"response":{"credential":[{"updated":true,"id":"AAABcID5GBc="},{"updated":true,"id":"AAABcID5GBd="}]}}

Status: 200, 404, 406



Section

Update credentials, filtered

Update credentials configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR needs the  ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/credentials/updateAll

Common filterFilters: The credential filter definition here

Update body parameter

Code Block
{
  "update" : {
    "description" : "DESCRIPTION",
    "throttlePolicy" : "THROTTLE_POLICY_ID",
    "properties": {
      "user": "true",
      .....
    }
  }
}

Response

Code Block
languagejs
{
  "message": "update result response message"
}

Status: 200, 406



Section

Delete multiple credentials, filtered

Delete multiple credentials from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/credentials/deleteAll

Common filterFilters: The credential filter definition here

Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200



Section

Delete credential(s)

Delete one or more connectors from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/credentials/:id

DELETE /aspire/_api/credentials

POST /aspire/_api/credentials/delete


Path Parameters and Query parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the credential(s) to delete


Body Parameter

NameTypeRequiredDescription
idsstringRequiredThe identifier(s) of the credential(s) to delete


Examples

Code Block
languagejs
DELETE /aspire/_api/credentials/AAABcID5GBc

DELETE /aspire/_api/credentials?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/credentials/delete
{
  "ids":["AAABcID5GBc","AAABcID5GBd"]
}


Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406




Section

Get credential type dxf (TODO)

Returns the dxf for a specific credential type

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/credentials/type/:typeId/dxf


Path Parameters

NameTypeRequiredDescription
typeIdstringRequiredThe id of the type for which dxf is going to be retrieved


Response

Code Block
languagejs
{
  "dxf": {...}
  "message": "optional response message"
}

Status: 200, 404

Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

 Some endpoint queries require a filter. A filter is basically a JSON object with the following format:

Seed filter:

Code Block
languagejs
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION",
	"throttlePolicy" : "THROTTLE_POLICY_ID"
  }