# Identity Rest API

Overview

Resource | Operation | Description
--- | --- | ---
Accounts | GET /identities/(identity_key)/(type) | list account identities.
GSS | PUT /identities/(account)/gss | add new GSS identity.
UserPass | PUT /identities/(account)/userpass | add new userpass identity.
X509 | PUT /identities/(account)/x509 | add new x509 identity.

Details

`PUT` `/identities/`(account)`/userpass`

  Create a new identity and map it to an account.

  Request Headers:
  | X-Rucio-Username – the desired username. X-Rucio-Password – the desired password.
  Parameters: | account – the affected account.
  Status Codes: | 201 Created – Created. 400 Bad Request – Missing username or password. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.

`PUT` `/identities/`(account)`/x509`

  Create a new identity and map it to an account.

  Parameters: | account – the affected account.
  Status Codes: | 201 Created – Created. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.

`PUT` `/identities/`(account)`/gss`

  Create a new identity and map it to an account.

  Parameters: | account – the affected account.
  Status Codes: | 201 Created – Created. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.

`GET` `/identities/`(identity_key)`/`(type)

  Return all identities mapped to an account.

  Parameters: | identify_key – Identity string. type – Identity type.
  Response Headers:
  | Content-Type – application/json
  Status Codes: | 200 OK – OK. 401 Unauthorized – Invalid Auth Token. 500 Internal Server Error – Internal Error.
  Returns: | List of identities.