Add Backend

post

/mobile/tools/1.0/mobilebackends

Creates a backend. You use backends to access the service.

Request

Supported Media Types
Body ()
The backend representation for POST requests.
Root Schema : mobilebackendCreate
Type: object
The backend representation for POST requests.
Match All
Show Source
Nested Schema : assetCreate
Type: object
The asset representation for POST requests.
Match All
Show Source
Nested Schema : mobilebackendCreate-allOf[1]
Type: object
Show Source
Nested Schema : assetUpdate
Type: object
The asset representation for PUT requests.
Show Source
Nested Schema : assetCreate-allOf[1]
Type: object
Show Source
Nested Schema : mobilebackendRoleAccess
Type: object
The backend's role-access details.
Show Source
Nested Schema : stringArray
Type: array
Minimum Number of Items: 0
An array of string values.
Show Source

Response

Supported Media Types

201 Response

The backend was created, and the metadata for the new backend was returned.
Headers
  • 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.
  • 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.
Match All
Show Source
Nested Schema : mobilebackendShortGet
Type: object
The backend representation for GET requests.
Match All
Show Source
Nested Schema : mobilebackendGet-allOf[1]
Type: object
Show Source
  • 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.
  • assetShort
    Asset information (short form).
  • localizedMessage
    Localized error message for generic purposes.
Nested Schema : assetGet
Type: object
The asset representation for GET requests.
Match All
Show Source
Nested Schema : mobilebackendOAuthKeys
Type: object
The client keys (client_id/client_secret) that are required for backend access using OAuth.
Show Source
Nested Schema : mobilebackendBasicAuthKeys
Type: object
The mobile backend ID that's required for backend access when you use Basic access authorization.
Show Source
Nested Schema : mobilebackendShortGet-allOf[3]
Type: object
Show Source
Nested Schema : assetUpdate
Type: object
The asset representation for PUT requests.
Show Source
Nested Schema : assetIdEtag
Type: object
The asset ID and entity tag (ETag) values.
Show Source
Nested Schema : trash
Type: object
Indicator of whether the asset is in the trash.
Show Source
Nested Schema : assetGet-allOf[3]
Type: object
Show Source
Nested Schema : entityLinksArray
Type: array
Minimum Number of Items: 0
An array of links for an entity's metadata.
Show Source
Nested Schema : items
Type: object
Link to the entity's metadata.
Show Source
Nested Schema : mobilebackendRoleAccess
Type: object
The backend's role-access details.
Show Source
Nested Schema : stringArray
Type: array
Minimum Number of Items: 0
An array of string values.
Show Source
Nested Schema : assetShort
Type: object
Asset information (short form).
Show Source
Nested Schema : localizedMessage
Type: object
Localized error message for generic purposes.
Show Source
Nested Schema : params
Type: array
Minimum Number of Items: 0
Show Source

400 Response

The backend specification is missing.
Body ()
Root Schema : error
Type: object
Show Source
Nested Schema : errorDetails
Type: object
Show Source

409 Response

A backend with the same name and version already exists.
Body ()
Root Schema : error
Type: object
Show Source
Nested Schema : errorDetails
Type: object
Show Source

500 Response

Something unpredictable has happened. See the error details.
Body ()
Root Schema : error
Type: object
Show Source
Nested Schema : errorDetails
Type: object
Show Source

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": []
    }
}