Add Backend
post
/mobile/tools/1.0/mobilebackends
Creates a backend. You use backends to access the service.
Request
Supported Media Types
- application/json
Body Parameter
The backend representation for POST requests.
Root Schema : mobilebackendCreate
Type:
object
The backend representation for POST requests.
-
Type:
object
assetCreateAdditional Properties Allowed:The asset representation for POST requests. -
Type:
object
mobilebackendCreate-allOf[1]Additional Properties Allowed:
Nested Schema : assetCreate
Type:
object
The asset representation for POST requests.
-
Type:
object
assetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
object
assetCreate-allOf[1]Additional Properties Allowed:
Nested Schema : mobilebackendCreate-allOf[1]
- analyticsAppGuid
-
Type:
string
Analytics application ID to associate with a new backend. - analyticsAppName
-
Type:
string
Analytics application name to create and associate with a new backend. - analyticsAppTimeZone
-
Type:
string
Analytics application timezone. Used only if the name is specified, ignored otherwise. - basic
-
Type:
boolean
- oauth
-
Type:
boolean
- roleAccess
-
Type:
object
mobilebackendRoleAccessAdditional Properties Allowed:The backend's role-access details.
Nested Schema : assetUpdate
Type:
object
The asset representation for PUT requests.
- actionComment
-
Type:
string
- desc
-
Type:
string
Maximum Length:100
- max
-
Type:
boolean
Default Value:false
- name
-
Type:
string
Required:true
Maximum Length:100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
- namespace
-
Type:
string
Applicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
string
Maximum Length:255
- version
-
Type:
string
Maximum Length:100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
Nested Schema : assetCreate-allOf[1]
- max
-
Type:
boolean
Default Value:false
Nested Schema : mobilebackendRoleAccess
Type:
object
The backend's role-access details.
- enabled
-
Type:
boolean
- roles
-
Type:
array
stringArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of string values.
Nested Schema : stringArray
Response
Supported Media Types
- application/json
201 Response
The backend was created, and the metadata for the new backend was returned.
Headers
- ETag
-
Type:
string
The ETag corresponds to the state of the backend (that is, the value increments by one on each change operation). You can use this ETag with the `If-Match` HTTP header on a request. - Location
-
Type:
string
URL to get the details about the new backend.
Body
The backend representation for GET requests.
Root Schema : mobilebackendGet
Type:
object
The backend representation for GET requests.
-
Type:
object
mobilebackendShortGetAdditional Properties Allowed:The backend representation for GET requests. -
Type:
object
mobilebackendGet-allOf[1]Additional Properties Allowed:
Nested Schema : mobilebackendShortGet
Type:
object
The backend representation for GET requests.
-
Type:
object
assetGetAdditional Properties Allowed:The asset representation for GET requests. -
Type:
object
mobilebackendOAuthKeysAdditional Properties Allowed:The client keys (client_id/client_secret) that are required for backend access using OAuth. -
Type:
object
mobilebackendBasicAuthKeysAdditional Properties Allowed:The mobile backend ID that's required for backend access when you use Basic access authorization. -
Type:
object
mobilebackendShortGet-allOf[3]Additional Properties Allowed:
Nested Schema : mobilebackendGet-allOf[1]
- analyticsAppGuid
-
Type:
string
Analytics application ID resolved from the policy. If a new analytics application creation was requested on the backend creation and this attribute is null, then the application wasn't created. In this case you can check if it already exists, retry, or create one with another name and/or timezone, and then link it to the backend. - targetBackend
-
Type:
object
assetShortAdditional Properties Allowed:Asset information (short form). - targetBackendError
-
Type:
object
localizedMessageAdditional Properties Allowed:Localized error message for generic purposes.
Nested Schema : assetGet
Type:
object
The asset representation for GET requests.
-
Type:
object
assetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
object
assetIdEtagAdditional Properties Allowed:The asset ID and entity tag (ETag) values. -
Type:
object
trashAdditional Properties Allowed:Indicator of whether the asset is in the trash. -
Type:
object
assetGet-allOf[3]Additional Properties Allowed:
Nested Schema : mobilebackendOAuthKeys
Type:
object
The client keys (client_id/client_secret) that are required for backend access using OAuth.
- clientID
-
Type:
string
Required:true
- clientSecret
-
Type:
string
Required:true
- sso
-
Type:
boolean
Nested Schema : mobilebackendBasicAuthKeys
Type:
object
The mobile backend ID that's required for backend access when you use Basic access authorization.
- basicAuthBackendId
-
Type:
string
Required:true
Nested Schema : mobilebackendShortGet-allOf[3]
- basic
-
Type:
boolean
- inactive
-
Type:
boolean
- oauth
-
Type:
boolean
- roleAccess
-
Type:
object
mobilebackendRoleAccessAdditional Properties Allowed:The backend's role-access details.
Nested Schema : assetUpdate
Type:
object
The asset representation for PUT requests.
- actionComment
-
Type:
string
- desc
-
Type:
string
Maximum Length:100
- max
-
Type:
boolean
Default Value:false
- name
-
Type:
string
Required:true
Maximum Length:100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
- namespace
-
Type:
string
Applicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
string
Maximum Length:255
- version
-
Type:
string
Maximum Length:100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
Nested Schema : assetIdEtag
Type:
object
The asset ID and entity tag (ETag) values.
- etag
-
Type:
string
The asset entity tag (ETag) value, which you can use to detect concurrent modification. - id
-
Type:
string
Required:true
Nested Schema : trash
Nested Schema : assetGet-allOf[3]
- createdOn
-
Type:
string
- deletedBy
-
Type:
string
- deletedOn
-
Type:
string
- links
-
Type:
array
entityLinksArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of links for an entity's metadata. - modifiedBy
-
Type:
string
- modifiedOn
-
Type:
string
- published
-
Type:
boolean
An asset draft or published status representation.
Nested Schema : entityLinksArray
Nested Schema : items
Type:
object
Link to the entity's metadata.
- href
-
Type:
string
Required:true
Link value. - rel
-
Required:
true
Allowed Values:[ "self", "canonical" ]
Link type.
Nested Schema : mobilebackendRoleAccess
Type:
object
The backend's role-access details.
- enabled
-
Type:
boolean
- roles
-
Type:
array
stringArrayAdditional Properties Allowed:Minimum Number of Items:0
An array of string values.
Nested Schema : stringArray
Nested Schema : assetShort
Type:
object
Asset information (short form).
- id
-
Type:
string
Asset identifier. - name
-
Type:
string
Asset name. - namespace
-
Type:
string
Asset namespace. - version
-
Type:
string
Maximum Length:100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
Nested Schema : localizedMessage
Type:
object
Localized error message for generic purposes.
- message
-
Type:
string
Required:true
- messageId
-
Type:
string
- params
-
Type:
array
paramsAdditional Properties Allowed:Minimum Number of Items:0
Nested Schema : params
400 Response
The backend specification is missing.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
409 Response
A backend with the same name and version already exists.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
500 Response
Something unpredictable has happened. See the error details.
Body
Root Schema : error
Type:
object
- detail
-
Type:
string
Required:true
Message that provides the error details. - o:ecid
-
Type:
string
Required:true
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components. - o:errorCode
-
Type:
string
Required:true
The service's error code. - o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
string
Required:true
The relative point in the API path where the error occurred. - status
-
Type:
integer
(int64
)Required:true
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object
- detail
-
Type:
string
Required:true
- o:errorDetails
-
Type:
object
errorDetailsAdditional Properties Allowed: - title
-
Type:
string
Required:true
Summary of the problem. - type
-
Type:
string
Required:true
The URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to add a backend using cURL. For more information about cURL, see Use cURL.
curl -i -X POST -d @body.json -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer $TOKEN" "$BASE_URL/mobile/tools/1.0/mobilebackends"
Example of Request Body
The following shows an example of the request body.
{ "name": "motd", "version": "1.0", "desc": "Message of the Day" }
Example of Response Header
The following shows an example of the response headers:
201 CREATED Content-Length: 2468 Content-Type: application/json Date: Thu, 05 Oct 2017 01:37:21 GMT Etag: "1" Location: http://myURL/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "id": "e7fabea8-7fa8-44c0-b52b-96b488df9560", "name": "motd", "version": "1.0", "desc": "Message of the Day", "links": [ { "rel": "canonical", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560" }, { "rel": "purgeDependencies", "href": "/mobile/tools/1.0/assets/purgeDependencies" }, { "rel": "purging", "href": "/mobile/tools/1.0/assets/purging" }, { "rel": "trashDependencies", "href": "/mobile/tools/1.0/assets/trashDependencies" }, { "rel": "trashing", "href": "/mobile/tools/1.0/assets/trashing" }, { "rel": "untrashDependencies", "href": "/mobile/tools/1.0/assets/untrashDependencies" }, { "rel": "untrashing", "href": "/mobile/tools/1.0/assets/untrashing" }, { "rel": "dependencies", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/dependencies" }, { "rel": "history", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/history" }, { "rel": "publication", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/publication" }, { "rel": "reverseDependencies", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/reverseDependencies" }, { "rel": "notifications", "href": "/mobile/tools/1.0/notifications/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/notifications" }, { "rel": "apis", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/apis" }, { "rel": "collections", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/collections" }, { "rel": "basicAuthentication", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/security/basic" }, { "rel": "basicAuthenticationKeys", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/security/basic/keys" }, { "rel": "identityProviders", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/security/identityproviders" }, { "rel": "oauthKeys", "href": "/mobile/tools/1.0/mobilebackends/e7fabea8-7fa8-44c0-b52b-96b488df9560/security/oauth/keys" }, { "rel": "self", "href": "/mobile/tools/1.0/mobilebackends/" } ], "published": false, "inTrash": false, "actionComment": null, "etag": "1", "createdOn": "2017-10-05T01:37:25.265Z", "modifiedOn": "2017-10-05T01:37:25.265Z", "modifiedBy": "jdoe", "deletedOn": null, "deletedBy": null, "clientId": "addd5fb618d84c44b6d1d4d4256a7c2e", "clientSecret": "5a7ddd27-0e5e-4f1f-825b-8e4c5dff06b8", "basicAuthBackendId": "9e76b8a0-cf54-4bfd-8cd7-6dc4b52e576e", "oauth": true, "basicAuth": true, "inactive": false, "roleAccess": { "enabled": false, "roles": [] } }