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:
objectThe backend representation for POST requests.
-
Type:
objectassetCreateAdditional Properties Allowed:The asset representation for POST requests. -
Type:
objectmobilebackendCreate-allOf[1]Additional Properties Allowed:
Nested Schema : assetCreate
Type:
objectThe asset representation for POST requests.
-
Type:
objectassetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
objectassetCreate-allOf[1]Additional Properties Allowed:
Nested Schema : mobilebackendCreate-allOf[1]
- analyticsAppGuid
-
Type:
stringAnalytics application ID to associate with a new backend. - analyticsAppName
-
Type:
stringAnalytics application name to create and associate with a new backend. - analyticsAppTimeZone
-
Type:
stringAnalytics application timezone. Used only if the name is specified, ignored otherwise. - basic
-
Type:
boolean - oauth
-
Type:
boolean - roleAccess
-
Type:
objectmobilebackendRoleAccessAdditional Properties Allowed:The backend's role-access details.
Nested Schema : assetUpdate
Type:
objectThe asset representation for PUT requests.
- actionComment
-
Type:
string - desc
-
Type:
stringMaximum Length:100 - max
-
Type:
booleanDefault Value:false - name
-
Type:
stringRequired:trueMaximum Length:100Pattern:^[a-zA-Z][a-zA-Z0-9_]*$ - namespace
-
Type:
stringApplicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
stringMaximum Length:255 - version
-
Type:
stringMaximum Length:100Pattern:^[a-zA-Z0-9][\w.]*$Asset version.
Nested Schema : assetCreate-allOf[1]
- max
-
Type:
booleanDefault Value:false
Nested Schema : mobilebackendRoleAccess
Type:
objectThe backend's role-access details.
- enabled
-
Type:
boolean - roles
-
Type:
arraystringArrayAdditional Properties Allowed:Minimum Number of Items:0An 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:
stringThe 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:
stringURL to get the details about the new backend.
Body
The backend representation for GET requests.
Root Schema : mobilebackendGet
Type:
objectThe backend representation for GET requests.
-
Type:
objectmobilebackendShortGetAdditional Properties Allowed:The backend representation for GET requests. -
Type:
objectmobilebackendGet-allOf[1]Additional Properties Allowed:
Nested Schema : mobilebackendShortGet
Type:
objectThe backend representation for GET requests.
-
Type:
objectassetGetAdditional Properties Allowed:The asset representation for GET requests. -
Type:
objectmobilebackendOAuthKeysAdditional Properties Allowed:The client keys (client_id/client_secret) that are required for backend access using OAuth. -
Type:
objectmobilebackendBasicAuthKeysAdditional Properties Allowed:The mobile backend ID that's required for backend access when you use Basic access authorization. -
Type:
objectmobilebackendShortGet-allOf[3]Additional Properties Allowed:
Nested Schema : mobilebackendGet-allOf[1]
- analyticsAppGuid
-
Type:
stringAnalytics 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:
objectassetShortAdditional Properties Allowed:Asset information (short form). - targetBackendError
-
Type:
objectlocalizedMessageAdditional Properties Allowed:Localized error message for generic purposes.
Nested Schema : assetGet
Type:
objectThe asset representation for GET requests.
-
Type:
objectassetUpdateAdditional Properties Allowed:The asset representation for PUT requests. -
Type:
objectassetIdEtagAdditional Properties Allowed:The asset ID and entity tag (ETag) values. -
Type:
objecttrashAdditional Properties Allowed:Indicator of whether the asset is in the trash. -
Type:
objectassetGet-allOf[3]Additional Properties Allowed:
Nested Schema : mobilebackendOAuthKeys
Type:
objectThe client keys (client_id/client_secret) that are required for backend access using OAuth.
- clientID
-
Type:
stringRequired:true - clientSecret
-
Type:
stringRequired:true - sso
-
Type:
boolean
Nested Schema : mobilebackendBasicAuthKeys
Type:
objectThe mobile backend ID that's required for backend access when you use Basic access authorization.
- basicAuthBackendId
-
Type:
stringRequired:true
Nested Schema : mobilebackendShortGet-allOf[3]
- basic
-
Type:
boolean - inactive
-
Type:
boolean - oauth
-
Type:
boolean - roleAccess
-
Type:
objectmobilebackendRoleAccessAdditional Properties Allowed:The backend's role-access details.
Nested Schema : assetUpdate
Type:
objectThe asset representation for PUT requests.
- actionComment
-
Type:
string - desc
-
Type:
stringMaximum Length:100 - max
-
Type:
booleanDefault Value:false - name
-
Type:
stringRequired:trueMaximum Length:100Pattern:^[a-zA-Z][a-zA-Z0-9_]*$ - namespace
-
Type:
stringApplicable to APIs and implementations only. This value is null for all other asset types. - title
-
Type:
stringMaximum Length:255 - version
-
Type:
stringMaximum Length:100Pattern:^[a-zA-Z0-9][\w.]*$Asset version.
Nested Schema : assetIdEtag
Type:
objectThe asset ID and entity tag (ETag) values.
- etag
-
Type:
stringThe asset entity tag (ETag) value, which you can use to detect concurrent modification. - id
-
Type:
stringRequired:true
Nested Schema : trash
Nested Schema : assetGet-allOf[3]
- createdOn
-
Type:
string - deletedBy
-
Type:
string - deletedOn
-
Type:
string - links
-
Type:
arrayentityLinksArrayAdditional Properties Allowed:Minimum Number of Items:0An array of links for an entity's metadata. - modifiedBy
-
Type:
string - modifiedOn
-
Type:
string - published
-
Type:
booleanAn asset draft or published status representation.
Nested Schema : entityLinksArray
Nested Schema : items
Type:
objectLink to the entity's metadata.
- href
-
Type:
stringRequired:trueLink value. - rel
-
Required:
trueAllowed Values:[ "self", "canonical" ]Link type.
Nested Schema : mobilebackendRoleAccess
Type:
objectThe backend's role-access details.
- enabled
-
Type:
boolean - roles
-
Type:
arraystringArrayAdditional Properties Allowed:Minimum Number of Items:0An array of string values.
Nested Schema : stringArray
Nested Schema : assetShort
Type:
objectAsset information (short form).
- id
-
Type:
stringAsset identifier. - name
-
Type:
stringAsset name. - namespace
-
Type:
stringAsset namespace. - version
-
Type:
stringMaximum Length:100Pattern:^[a-zA-Z0-9][\w.]*$Asset version.
Nested Schema : localizedMessage
Type:
objectLocalized error message for generic purposes.
- message
-
Type:
stringRequired:true - messageId
-
Type:
string - params
-
Type:
arrayparamsAdditional 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:
stringRequired:trueMessage that provides the error details. - o:ecid
-
Type:
stringRequired:trueExecution 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:
stringRequired:trueThe service's error code. - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
stringRequired:trueThe relative point in the API path where the error occurred. - status
-
Type:
integer(int64)Required:trueHTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object- detail
-
Type:
stringRequired:true - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe 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:
stringRequired:trueMessage that provides the error details. - o:ecid
-
Type:
stringRequired:trueExecution 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:
stringRequired:trueThe service's error code. - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
stringRequired:trueThe relative point in the API path where the error occurred. - status
-
Type:
integer(int64)Required:trueHTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object- detail
-
Type:
stringRequired:true - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe 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:
stringRequired:trueMessage that provides the error details. - o:ecid
-
Type:
stringRequired:trueExecution 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:
stringRequired:trueThe service's error code. - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - o:errorPath
-
Type:
stringRequired:trueThe relative point in the API path where the error occurred. - status
-
Type:
integer(int64)Required:trueHTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details. - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
object- detail
-
Type:
stringRequired:true - o:errorDetails
-
Type:
objecterrorDetailsAdditional Properties Allowed: - title
-
Type:
stringRequired:trueSummary of the problem. - type
-
Type:
stringRequired:trueThe 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": []
}
}