# Credential Controller Resource

The API allows you to list, view, create and edit credential

### GET /credential

Request Parameters
name | type | description
--- | --- | ---
direction | query |
filter | query |
nameLike | query |
orderBy | query |
page | query |
project-uuid | query |
size | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of CredentialDetails (JSON) |

#### Example

##### Request

    GET /credential
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ { } ]

### POST /credential

Request Body
media type | data type
--- | ---
application/json | CredentialCreateRequest (JSON)

Response Body
media type | data type | description
--- | --- | ---
application/json | CredentialDetails (JSON) |

#### Example

##### Request

    POST /credential
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    { }

### DELETE /credential/{guid}

Request Parameters
name | type | description
--- | --- | ---
guid | path |

#### Example

##### Request

    DELETE /credential/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /credential/{guid}

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Response Body
media type | data type | description
--- | --- | ---
application/json | CredentialDetails (JSON) |

#### Example

##### Request

    GET /credential/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }

### PUT /credential/{guid}

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Request Body
media type | data type
--- | ---
application/json | CredentialRequest (JSON)

Response Body
media type | data type | description
--- | --- | ---
application/json | CredentialDetails (JSON) |

#### Example

##### Request

    PUT /credential/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 204 No Content
    Content-Type: application/json

    { }

### GET /credential/{guid}/password

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Response Body
media type | data type | description
--- | --- | ---
application/json | StringDTO (JSON) |

#### Example

##### Request

    GET /credential/{guid}/password
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }

### PUT /credential/{guid}/password

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Request Body
media type | data type
--- | ---
application/json | StringDTO (JSON)

#### Example

##### Request

    PUT /credential/{guid}/password
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 204 No Content

### GET /credential/{guid}/ssh-key

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Response Body
media type | data type | description
--- | --- | ---
application/json | StringDTO (JSON) |

#### Example

##### Request

    GET /credential/{guid}/ssh-key
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }