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

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


Query String Parameters

NameTypeRequiredDescription
startfromintegerOptionalRetrieves 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


Response

Code Block
languagejs
{
  "credential": [{
    "id": "AAABcID5GBc=",
    "type": "filesystem",
    "description": "Sales HD1 credentials",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object } 
  },
  {
    "id": "AAABcIueWUc=",
    "type": "filesystem",
    "description": "Sales HD2 credentials",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }]
}


Status

Response codeDescription
200Success




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
startfromintegerOptionalRetrieves 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


Body Parameters

NameTypeRequiredDescription
FilterJSONRequiredFilters retrieved credentials. Check the filter definition here


Response

Code Block
languagejs
{
  "credential": [{
    "id": "AAABcID5GBc=",
    "type": "filesystem",
    "description": "Sales HD1 credentials",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object } 
  },
  {
    "id": "AAABcIueWUc=",
    "type": "filesystem",
    "description": "Sales HD2 credentials",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
  }]
}


Status

Response codeDescription
200Success




Section

Get a single credential

Get information about a single credential configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/credentials/:id


Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the credential to return


Response

Code Block
languagejs
{
  "credential": {
    "id": "AAABcID5GBc=",
    "type": "filesystem",
    "description": "Filesystem credentials",
    "created": 1596707252548,
    "updated": 1596707252548,
	"properties": { This will be a dynamic JSON object }  
 }
}


Status

Response codeDescription
200Success
404The given credentials id was not found




Section

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


Example

Code Block
languagejs
POST /aspire/_api/credentials
[{
  "type": "filesystem"
  "description": "Europe Net Appliance"
  "username": "admin"
},
{
  "type": "sharepoint"
  "description": "SP Online"
  "username": "admin"
}]


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 }  
   },
   {
    "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 codeDescription
201Created
406Not acceptable - there was an issue validating the input




Section

Add single credential

Add a credential 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


Example

Code Block
languagejs
POST /aspire/_api/credentials
{
  "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
201Created
406Not acceptable - there was an issue validating the input




Section

Update multiple credentials

Update multiple credentials in Aspire.

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

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": "filesystem"
    "description": "Europe Net Appliance"
  },
  "AAABcIueWUc=": {
    "id": "AAABcIueWUc=",
    "type": "sharepoint"
    "description": "SP Online"
  }
}


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 }  
   },
   {
    "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 codeDescription
200Success
404Not found - a given credential identifier was not found
406Not acceptable - there was an issue validating the input




Section

Update single credential

Update a credential in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/credentials/:id


Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the credential to update


Body Parameters

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

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%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

Delete multiple credentials, filtered

Delete multiplefrom Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/credentials/deleteAll


Body Parameters

NameTypeRequiredDescription
FilterJSONRequiredFilters retrieved credentials. Check the filter definition here


Example

Code Block
languagejs
POST /aspire/_api/credentials

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 codeDescription
200Success
404Not found - a given credential identifier was not found
406Not 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

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


Example

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 codeDescription
200Success
404Not found - a given credential identifier was not found
406Not 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

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


Response

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


Status

Response codeDescription
200Success
404Not found - a given service identifier was not found




Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

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

Credentials filter:

Code Block
languagejs
  "filter" : {
    "ids" : ["id1", "id2", "id3"],
    "type" : "TYPE",
    "description" : "DESCRIPTION"
  }
Note
When using delete endpoints, ids in the filter are mandatory.