-
Notifications
You must be signed in to change notification settings - Fork 49
API Record Credentials
Lukas Metzger edited this page Apr 2, 2018
·
12 revisions
GET /records/{id}/credentials?page=5&pagesize=10
parameter | explanation |
---|---|
page | The page of the results to return, if ommited returns page 1 |
pagesize | How many items should be on each page, if ommited page size is infinite therefore all results are returned |
code | result |
---|---|
200 | Everything was successful |
403 | User has no permissions for the given record |
{
"paging": {
"page": 5,
"total": 20,
"pagesize": 10
},
"results": [
{
"id": 1,
"description": "This is for what that credential is",
"type": "key|password"
}
]
}
POST /records/{id}/credentials
{
"description": "This is for what that credential is",
"type": "key|password",
"key?": "key if type=key",
"password?": "password if type=password"
}
code | result |
---|---|
201 | Everything was successful, domain has been created |
400 | Either type is not valid, or key is not a valid public key |
404 | The given record was not found. |
422 | One of the required fields is missing |
{
"id": 1,
"description": "This is for what that credential is",
"type": "key|password",
"key?": "key if type=key"
}
DELETE /records/{id}/credentials/{id}
code | result |
---|---|
204 | Everything was successful, the answer body is therefore empty |
403 | User has no permission for the record |
404 | The given record id does not exist |
GET /records/{id}/credentials/{id}
code | result |
---|---|
200 | Call was successful |
404 | The given record id does not exist |
{
"id": 1,
"description": "This is for what that credential is",
"type": "key|password",
"key?": "key if type=key"
}
PUT /records/{id}/credentials/{id}
If type is given the corosponding key or password attribute must be set.
{
"description": "This is for what that credential is",
"type": "key|password",
"key?": "key if type=key",
"password?": "password if type=password"
}
code | result |
---|---|
204 | Everything was successful, the answer body is therefore empty |
400 | Either type is not valid, or key is not a valid public key |
403 | User has no permissions for this record |
404 | The given credential id does not exist |
422 | One of the required fields is missing, or key is invalid |