Configuration
Configurations available with the Nextmv Cloud API.
Configuration is defined using profiles in Nextmv Cloud. Profiles let you define a configuration once for settings that are consistent across runs, and use it within a run by referencing the profile identifier. For certain types of functionality you'll need to define a profile in order to be able to use the feature. For example, some integration profiles require you to specify a secret API key that you wouldn't necessarily want to provide repeatedly. With a profile, you can set it once so we can store and manage the key securely.
We support two types of profiles: run profiles and integration profiles.
  • A run profile lets you configure information that impacts the behavior of a run.
  • An integration profile lets you configure information used for a partner integration.
Note, integrations and run profiles can also be set up and edited through the Nextmv Cloud Console. See the console configuration page for more information.

Endpoints

Note, all requests must be authenticated with Bearer Authentication. Make sure your request has a header containing your Nextmv Cloud API key, as such:
  • Key: Authorization
  • Value: Bearer <YOUR-API-KEY>
Bash
1
Authorization: Bearer <YOUR-API-KEY>
Copied!
post
https://api.cloud.nextmv.io
/v1/routing/profiles/run
Create a new run profile.
get
https://api.cloud.nextmv.io
/v1/routing/profiles/run
List all run profiles.
get
https://api.cloud.nextmv.io
/v1/routing/profiles/run/{profile_id}
Get a specific run profile.
put
https://api.cloud.nextmv.io
/v1/routing/profiles/run/{profile_id}
Modify a run profile.
delete
https://api.cloud.nextmv.io
/v1/routing/profiles/run/{profile_id}
Delete a run profile.
get
https://api.cloud.nextmv.io
/v1/routing/profiles/integration
List all third-party run profile integrations.
For the full specification, please visit the Nextmv Cloud API OpenAPI specification.

Using configurations

  1. 1.
    Get the Nextmv and integration API keys (if applicable). This only needs to be done once.
  2. 2.
    Set up an integration (if applicable). Integration profiles let you configure and securely store information used for a partner integration, such as the API key for the integrated system. See the Integrations section for a list of third-party integrations supported by Nextmv Cloud API and API endpoints for each. Note: To use an integration, it must always be configured as part of a run profile.
  3. 3.
    Create a run profile (referencing the integration profile, if applicable).
  4. 4.
    Use the run profile ID in the input schema when submitting a new run.
  5. 5.
    Manage your configurations using the endpoints.

Run profiles

To use third-party integrations as part of a run, they must be referenced in a run profile. First configure the integrations and then create or update a run profile with your integration(s).
Run profiles let you configure information that impacts the behavior of a run but does not vary run to run, for example the type of measure used. A run profile optionally contains references to zero or more integration profiles. To create a run profile, send a request to the POST /v1/routing/profiles/run endpoint with a JSON payload that follows this schema:
Property
Required
Field name
Type
Description
Example
Name
Yes
name
string
Human-readable name to identify the run profile.
"name": "Sample run profile"
ID
Yes
id
string
ID of the run profile; only lower case letters, numbers, and dashes permitted; max length 32 characters.
"id": "onfleet-run-profile"
Description
No
description
string
A description of the run profile.
"description": "Delivery profile"
Integrations
No
integrations
array of object
List of previously configured integrations you want to make available for the run profile. Please see: supported integrations.
"integrations": [{ "id": "onfleet-key", "type": "onfleet" }]
Each integration object follows this schema:
Property
Required
Field name
Type
Description
Example
Type
Yes
type
string
Type of integration. Please see: supported integrations.
"type": "onfleet"
ID
Yes
id
string
ID of a previously configured integration.
"id": "my-onfleet-integration"
A sample schema and response are provided below:
sample schema (JSON)
sample response (JSON)
1
{
2
"name":"Sample Run Profile",
3
"id":"onfleet-run-profile",
4
"description": "Delivery profile",
5
"integrations":[
6
{
7
"type":"onfleet",
8
"id":"my-onfleet-integration"
9
}
10
]
11
}
Copied!
1
{
2
"name": "Sample Run Profile",
3
"description": "Delivery profile",
4
"id": "onfleet-run-profile",
5
"version": "2022-03-15T23:49:50.053811Z",
6
"integrations": [
7
{
8
"type": "onfleet",
9
"id": "my-onfleet-integration"
10
}
11
]
12
}
Copied!
Make sure to store the id, as you will need it when creating a new run. Please note that you may set up multiple run profiles using this method. You only need to do this process once for each API key.
To modify an existing run profile, you can use the PUT /v1/routing/profiles/run/{profile_id} endpoint with a JSON payload that follows the same schema as when creating a new run profile (described in the table above). Note that you may not modify the original id.