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

toc
Easy Heading Free
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Pagination query string parameters

Sorting query string parameters

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

Query String Parameters

NameTypeRequiredDescription
fromintegerOptionalRetrieves the specified page of results
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
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

Sorting query string parameters

Filters: The credential filter definition here

sortModestringOptional"asc" for ascending sort, "desc" for descending sort

Response

Code Block
languagejs
themeRDark
{
    "credentialcount": [{
    "id    "totalItems": "AAABcID5GBc=" 1
    },
    "typecredential": "filesystem",[
    "description": "Sales HD1 credentials",
    {
      "created": 1596707252548,
      "updatedid": 1596707252548,
	"properties": { This will be a dynamic JSON object } 
  },
  {
"40b305ea-77e1-4874-aa28-964b1cf4a1a8",
            "idtype": "AAABcIueWUc=filesystem",
     "type": "filesystem",
       "description": "Sales HD2 credentialsxxxx",
    "created        "throttlePolicy": 1596707252548,
"10653921-1b27-40b5-9d7a-f54ef1e3ad01",
           "updated": 1596707252548,
	"properties": {
  This    will be a dynamic JSON object }  
  }]
}

Status

Response codeDescription200Success
  "domain": "xxxx",
                "user": "xxxx",
                "password": "xxxx"
            }
        }
    ]
}

Status: 200




Body Parameters

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
Section

Get all credentials, filtered

Lists credentials configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/credentials/getAll

Query String Parameters

NameTypeRequiredDescription
fromintegerOptionalRetrieves the specified page of results
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional"asc" for ascending sort, "desc" for descending sort
Filters retrieved credentials. Check the filter definition here
NameTypeRequiredDescription
FilterJSONRequired


Response

Code Block
languagejs
themeRDark
{
    "credential": [{
        "id": "AAABcID5GBc=40b305ea-77e1-4874-aa28-964b1cf4a1a8",
        "type": "filesystem",
        "description": "Sales HD1 credentialsxxxx",
        "createdthrottlePolicy": 1596707252548"10653921-1b27-40b5-9d7a-f54ef1e3ad01",
        "updatedproperties": 1596707252548,
	"properties": { This will be a dynamic JSON object } 
  }{
            "domain": "xxxx",
  {
     "id": "AAABcIueWUc=",
    "typeuser": "filesystemxxxx",
     "description": "Sales HD2 credentials",
    "createdpassword": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }]
}

Status

Response codeDescription200Success Section
"xxxx"
        }
    }
}

Status: 200, 404




Example

Section

Add credential(s)

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

Get a single credential

Get information about a single credential configured in Aspire

Panel
borderColorblack
bgColor#fafafb
GET POST /aspire/_api/credentials/:id


Query String Body Parameters

NameTypeRequiredDescription
idtypestringRequiredThe id type of the credential to return

Response

add
descriptionstringRequiredAn optional description of the credential
throttlePolicystringOptionalThe throttle policy id
propertiesstringRequiredCredential properties


Example

Code Block
languagejs
themeRDark
POST /aspire/_api/credentials
Code Block
languagejs
{
  "credential": {
    "idtype": "AAABcID5GBc=filesystem",
    "typedescription": "filesystemxxxx",
    "descriptionproperties": {
 "Filesystem credentials",
       "createddomain": 1596707252548"xxxx",
        "updateduser": 1596707252548"xxxx",
	"properties":  { This will be a dynamic JSON object }"password": "xxxx"
   
 }
}


StatusResponse

Response
Code Block
Description
language
200
js
Success
theme
404The given credentials id was not found
Section
RDark
{
    "credential": [
        {
            "id": "43d1a498-c672-46b7-902f-082222122481",
          

Add multiple credentials

Adds multiple credentials to Aspire

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

Body Parameters

NameTypeRequiredDescription
typestringRequiredThe type of credential to add
descriptionstringRequiredAn optional description of the credential
Code Block
languagejs
POST /aspire/_api/credentials
[{
  "type": "filesystem",
            "description": "Europe Net Appliance"
xxxx",
            "usernameproperties": "admin"
},
{
       "type": "sharepoint"
  "description": "SP Online"
         "usernamedomain": "adminxxxx"
}]

Response

Code Block
languagejs
{
  "credential": [{
,
           "id": "AAABcID5GBc=",
    "typeuser": "filesystemxxxx",
    "description": "Europe Net Appliance",
    "created": 1596707252548,
    "updatedpassword": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
xxxx"
            },
   {
    "id": "AAABcIueWUc=", }
    "type": "sharepoint"
    "description": "SP Online",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }]
}

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

Status

Response codeDescription201Created406Not acceptable - there was an issue validating the input Section
]
}

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 needs the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/credentials/:id

PUT /aspire/_api/credentials

Body Parameters

Name

Add single credential

Add a credential to Aspire

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

Body Parameters

type type add
NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update
descriptionstringRequiredxAn optional The description of the credential
propertiesobjectxCredential properties
throttlePolicystringxThe throttle policy id

x - at least one field must be present

Example - update more credentials

Code Block
languagejs
themeRDark
PUTPOST /aspire/_api/credentials
{
  "typeAAABcID5GBc=": "filesystem"{
    "descriptionid": "Europe Net Appliance"
}

Response

Code Block
languagejs
{AAABcID5GBc=",
    "throttlePolicy": "10653921-1b27-40b5-9d7a-f54ef1e3ad01"
  },
  "credentialAAABcID5GBd=": [{
    "id": "AAABcID5GBcAAABcID5GBd=",
    "typeproperties": "filesystem"
{
       "descriptiondomain": "Europe Net Appliance"xxxx",
       "createduser": 1596707252548"xxxx",
       "updatedpassword": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
 xxxx"
    }
  }]
}

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

Status

Response codeDescription
201Created
406Not acceptable - there was an issue validating the input
Section


Response

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

Status: 200, 404, 406


Section

Update multiple credentials

Update multiple credentials in Aspire.

Panel
borderColorblack
bgColor

Update credentials, filtered

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

Panel
borderColorblack
bgColor
#fafafb

PUT /aspire/_api/credentials

Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update
typestringOptionalThe type of credential
descriptionstringOptionalAn optional description of the credential

/updateAll

Filters: The credential filter definition here

Update body parameter

Code Block
themeRDark
{
  "update" : {
    "description" : "DESCRIPTION",
    "throttlePolicy" : "THROTTLE_POLICY_ID"

Other parameters passed in the request body will depend on the type of credential being created - see Add credential(s) above

Example

Code Block
languagejs
PUT /aspire/_api/credentials { "AAABcID5GBc=": { "id": "AAABcID5GBc="
,
    "
type
properties": 
"filesystem"
{
      "
description
user": "
Europe Net Appliance
true",
   
},
  
"AAABcIueWUc=": {
 .....
    
"id": "AAABcIueWUc=", "type": "sharepoint" "description": "SP Online" }
}
  }
}

Response

Code Block
languagejs
themeRDark
{
  "
credential
message": 
[{
"update result response 
"id": "AAABcID5GBc=", "type": "filesystem" "description": "Europe Net Appliance", "created": 1596707252548, "updated": 1596707252548, "properties": { This will be a dynamic JSON object } }, { "id": "AAABcIueWUc=", "type": "sharepoint" "description": "SP Online", "created": 1596707252548, "updated": 1596707252548, "properties": { This will be a dynamic JSON object } }] }

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

Status

Response codeDescription200Success404Not found - a given credential identifier was not found406Not acceptable - there was an issue validating the input Section
message"
}

Status: 200, 406




Body Parameters

Other parameters passed in the request body will depend on the type of credential being created - see Add credential(s) above

Example

Section

Delete credential(s)

Delete one or more connectors from Aspire, this endpoint need 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
themeRDark
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
themeRDark
{
  "message": "delete result response message"
}

Status: 200, 404, 406


Section

Delete multiple credentials, filtered

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

Update single credential

Update a credential in Aspire

.

Panel
borderColorblack
bgColor#fafafb
PUT

POST /aspire/_api/credentials/

:id

Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update
NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update
typestringOptionalThe type of credential
descriptionstringOptionalAn optional description of the credential

deleteAll

Filters: The credential filter definition here

Response

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

Status: 200




Response

Section

Export credentials(s)

Export one or more credential from Aspire, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/credentials/export

GET /aspire/_api/credentials/export/:id

POST

Code Block
languagejs
PUT

/aspire/_api/credentials/

AAABcID5GBc%3D { "id": "AAABcID5GBc=", "type": "filesystem" "description": "Europe Net Appliance" }

Response

Code Block
languagejs
{
  "credential": [{
    "id": "AAABcID5GBc=",
    "type": "filesystem"
    "description": "Europe Net Appliance",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
   }]
}

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

Status

Response codeDescription
200Success
404Not found - a given credential identifier was not found
406Not acceptable - there was an issue validating the input
Section

exportAll

Info

Every configuration item has the option to export from the UI, using the single menu or by the bulk actions:

Image AddedImage Added

Note

Something important that you need to know is that when you export a config item that depends on another, the export will contain also all the dependencies.

Note

Take into consideration that components with resources loaded into elastic, will be exported, but the resource itself will not, so you will need to reupload the resource and go and select your resource in the component again.


Path Parameters and Query parameters

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


Body Parameter

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


Examples

Code Block
languagejs
themeRDark
GET 

Delete multiple credentials, filtered

Delete multiplefrom Aspire, filtered by a specified criteria
Panel
borderColorblack
bgColor#fafafb
POST
/aspire/_api/credentials
/deleteAll

Body Parameters

NameTypeRequiredDescription
FilterJSONRequiredFilters retrieved credentials. Check the filter definition here
Code Block
languagejs
{
  "message": "optional response message"
}

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

Status

Response codeDescription200Success404Not found - a given credential identifier was not found406Not acceptable - there was an issue validating the input Section

Delete single credential

Delete a credentials from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/credentials/:id

Query String Parameters

/export/AAABcID5GBc

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

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


Response

Code Block
languagejs
themeRDark
{
  "export": {
    "credentials": {
      "credential": [
        {
          "id": "<credential_id>",
          "type": "rest-api",
          "description": "REST",
          "properties": {
            "type": "bearer",
            "query": {
              ...
            }
          }
        },
		...
      ]
    }
  }
}

Status: 200, 404, 406


Section

Export multiple credentials, filtered

Export multiple credentials from Aspire, filtered by a specified criteria, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/credentials/exportAll

Filters: The connection filter definition here

Response

Code Block
languagejs
themeRDark
{
  "export": {
    "credentials": {
      "credential": [
        {
          "id": "<credential_id>",
          "type": "rest-api",
          "description": "REST",
          "properties": {
            "type": "bearer",
            "query": {
              ...
            }
          }
        },
		...
      ]
    }
  }
}

Status: 200




Section

Import

The import usage can be found here





Example

Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

Credential filter:

Code Block
languagejs
themeRDark
{ 
NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the credential(s) to delete
Code Block
languagejs
DELETE /aspire/_api/credentials/AAABcID5GBc=

Response

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

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

Status

Response codeDescription200Success404Not found - a given credential identifier was not found406Not acceptable - there was an issue validating the input Section

Get credential type dxf

Returns the dxf for a specific credential type

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

Query String Parameters

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

Response

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

Status

Response codeDescription200Success404Not found - a given service identifier was not found SectionFilters AnchorFiltersAnchorFiltersAnchor

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

Credentials filter:

Code Block
languagejs
  "filter" : {
    "ids" : ["id1ID1", "id2ID2", "id3ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION",
	"throttlePolicy" : "THROTTLE_POLICY_ID"
  }
Note
When using delete endpoints, ids in the filter are mandatory.
}