Create an Application
post
/api/v2/applications/
Make a POST request to this resource with the following application fields to create a new application:
name: Name of this application. (string, required)-
description: Optional description of this application. (string, default="") -
client_type: Set to Public or Confidential depending on how secure the client device is. (choice, required)confidential: Confidentialpublic: Public
redirect_uris: Allowed URIs list, space separated (string, default="")authorization_grant_type: The Grant type the user must use for acquire tokens for this application. (choice, required)authorization-code: Authorization codepassword: Resource owner password-based
skip_authorization: Set True to skip authorization step for completely trusted applications. (boolean, default=False)organization: Organization containing this application. (id, required)
Request
Supported Media Types
- application/json
Root Schema : schema
Example:
{
"authorization_grant_type":"password",
"client_type":"confidential",
"name":"test app",
"organization":1
}Response
Supported Media Types
- application/json
201 Response
Example Response (application/json)
{
"authorization_grant_type":"password",
"client_id":"xxxx",
"client_secret":"VT3iEdL6iGx9RUUY8rk5EXuTF8mkQebtFMGVqfxzXpNtQkVWuOtXioGhuCAIb0m7IdxnTcGqWJoPn6QMh2Rz7EkE3nzRWKMGF5JHOlZVwn4PaiIguGiUKQHDPrDORjZf",
"client_type":"confidential",
"created":"2018-02-01T08:00:00.000000Z",
"description":"",
"id":1,
"modified":"2018-02-01T08:00:00.000000Z",
"name":"test app",
"organization":1,
"redirect_uris":"",
"related":{
"activity_stream":"/api/v2/applications/1/activity_stream/",
"tokens":"/api/v2/applications/1/tokens/"
},
"skip_authorization":false,
"summary_fields":{
"organization":{
"description":"test-org-desc",
"id":1,
"name":"test-org"
},
"tokens":{
"count":0,
"results":[
]
},
"user_capabilities":{
"delete":true,
"edit":true
}
},
"type":"o_auth2_application",
"url":"/api/v2/applications/1/"
}
400 Response
Example Response (application/json)
{
"authorization_grant_type":[
"This field is required."
],
"client_type":[
"This field is required."
],
"organization":[
"This field is required."
]
}