You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »


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

Get all credentials

Lists all the credentials configured in the Aspire

GET /aspire/_api/credentials


Query String Parameters

NameTypeRequiredDescription
startintegerOptionalRetrieves the specified page of results
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted


Response

{
  "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

Get all credentials, filtered

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

POST /aspire/_api/credentials/getAll

{

  FILTER

}

Query String Parameters

NameTypeRequiredDescription
startintegerOptionalRetrieves the specified page of results
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted


Response

{
  "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

Get a single credential

Get information about a single credential configured in Aspire

GET /aspire/_api/credentials/:id

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the credential to return

Response

{
  "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




Add credentials

Add one or more credentials to Aspire

POST /aspire/_api/credentials

Request Body Parameters

NameTypeRequiredDescription
typestringRequiredThe type of credential to add
descriptionstringRequiredAn optional description of the credential


Examples

Add a single credential

POST /aspire/_api/credentials
{
  "type": "filesystem"
  "description": "Europe Net Appliance"
}

Add multiple credentials

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

Response

{
  "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




Update credentials

Update one or more credentials in Aspire.

PUT /aspire/_api/credentials/:id

PUT /aspire/_api/credentials

Path and Request 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

Examples

Update a single credential

PUT /aspire/_api/credentials/AAABcID5GBc%3D
{
  "id": "AAABcID5GBc=",
  "type": "filesystem"
  "description": "Europe Net Appliance"
}

Update multiple credentials

PUT /aspire/_api/credentials
{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "type": "filesystem"
    "description": "Europe Net Appliance"
  },
  "AAABcIueWUc=": {
    "id": "AAABcIueWUc=",
    "type": "sharepoint"
    "description": "SP Online"
  }
}

Response

{
  "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




Delete credentials

Delete one or more credentials from Aspire.

DELETE /aspire/_api/credentials/:id

DELETE /aspire/_api/credentials

Path and Query string Parameters

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

Examples

Delete a single credential

DELETE /aspire/_api/credentials/AAABcID5GBc=

Delete multiple credentials

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

Response

{
  "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

Get credential type dxf

Returns the dxf for a specific credential type

GET /aspire/_api/credentials/type/:typeId/dxf

Query String Parameters

NameTypeRequiredDescription




Response

{
  "dxf": {...}
  "message": "optional response message"
}

Status

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

Filters

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

Credentials filter:

{
  "filter" : {
    "ids" : ["id1", "id2", "id3"],
    "type" : "TYPE",
    "description" : "DESCRIPTION"
  }
}
  • No labels