Create trust (POST /v3/OS-TRUST/trusts)
Creates a trust.
Request headers
Content-type
Indicates the format of content defined in the MIME specification.
Specify application/json. (required)
Data type | Cardinality |
---|---|
xsd:string | 1..1 |
Accept
Indicates the accept format defined in the MIME specification.
Specify application/json. (optional)
Data type | Cardinality |
---|---|
xsd:string | 1..1 |
X-Auth-Token
Valid authentication token
Data type | Cardinality |
---|---|
xsd:string | 1..1 |
Request parameters
trust
trust object (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | None | expires_at impersonation project_id roles trustee_user_id trustor_user_id |
expires_at
- Input format:
- "YYYY-MM-DDThh:mm:ss.uuuuuuZ"
("2015-02-27T18:30:59.999999Z")
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
impersonation
The impersonation flag (required)
- true: Authenticate using the trustor information
- false: Authenticate using the trustee information
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:boolean | 1..1 | trust | None |
project_id
The project ID assigned to the role that is to be trusted (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
roles
roles object (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | trust | (role) |
(role)
role object (object name is not displayed)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..n | roles | name |
name
The name of the role that is to be trusted (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | (role) | None |
trustee_user_id
The trustee user ID (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
trustor_user_id
The trustor user ID (required)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
Response headers
HTTP status code
Returns the HTTP status code of the request.
One of the following values will be returned.
- 201:
- Normal completion
- 400:
- Invalid access (invalid parameter, etc.)
- 401:
- Authentication error
- 403:
- Cannot access (no privileges)
- 404:
- No applicable resources
- 409:
- Data conflict occurred
- 500:
- Unexpected error
- 501:
- Has not been implemented
- 503:
- Cannot use service
Data type | Cardinality |
---|---|
int | 1..1 |
Vary
By setting or changing the following header, notification is given that expressions can be requested in a different file format.
X-Auth-Token
Data type | Cardinality |
---|---|
xsd:string | 1..1 |
Content-Type
Indicates the format of content defined in the MIME specification.
application/json
Data type | Cardinality |
---|---|
xsd:string | 1..1 |
Content-Length
Indicates the length of an entity in bytes.
Data type | Cardinality |
---|---|
int | 1..1 |
Date
Indicates the date when the request was created.
Data type | Cardinality |
---|---|
date | 1..1 |
Response elements
trust
trust object
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | None | expires_at impersonation project_id roles trustee_user_id trustor_user_id id remaining_uses role_links links |
impersonation
The impersonation settings
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:boolean | 1..1 | trust | None |
roles_links
Link information of trust role
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | trust | self previous next |
trustor_user_id
The trustor user ID
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
links
Link information of trust
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | trust | self |
roles
roles object
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | trust | (role) |
(role)
role object (object name is not displayed)
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..n | (roles) | id links name |
id
Role ID that is to be trusted
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | (role) | None |
links
Link information of role
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
Element | 1..1 | (role) | self |
name
Role name that is to be trusted
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | (role) | None |
remaining_uses
Number of times that the token still can be used
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
expires_at
Trust expiry datetime
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
trustee_user_id
The trustee user ID
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
project_id
The project ID assigned to the role that is to be trusted
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
id
Trust ID
Data type | Cardinality | Parent element | Child element |
---|---|---|---|
xsd:string | 1..1 | trust | None |
Example of request
POST /v3/OS-TRUST/trusts
X-Auth-Token: MIIIHgYJKoZIhvcNAQcCoIIIDzCCCAsCAQExC . . .
{
"trust": {
"expires_at": "2015-02-27T18:30:59.999999Z",
"impersonation": true,
"project_id": "--project-id--",
"roles": [
{
"name": "--role-name--"
}
],
"trustee_user_id": "--trustee-user-id--",
"trustor_user_id": "--trustor-user-id--"
}
}
Example of response
{
"trust": {
"impersonation": true,
"roles_links": {
"self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/OS-TRUST/trusts/--trust_id--/roles",
"previous": null,
"next": null
},
"trustor_user_id": "--trustor_user_id--",
"links": {
"self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/OS-TRUST/trusts/--trust_id--"
},
"roles": [
{
"id": "--role_id--",
"links": {
"self": "http://identity.jp-east-1.cloud.global.fujitsu.com/v3/roles/--role_id--"
},
"name": "--role_name--"
}
],
"remaining_uses": 5,
"expires_at": "2015-02-27T18:30:59.999999Z",
"trustee_user_id": "--trustee_user_id--",
"project_id": "--project_id--",
"id": "--trust_id--"
}
}