Create source

post/v1/environments/{environmentId}/sources
Page View

Source endpoints allow you to manage sources in a specified environment.

You must be a member of the environment and be assigned to an engineer role to manage sources. Learn about roles.

Create source

Create a new source in the specified environment.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/environments/{environmentId}/sources' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"name": "string"
8
}'

Request Body Schema

    Contains the fields that can be provided when creating a new source.

  • name
    required, string

    Displays the human-readable name of the source.

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"source": {
7
"name": "string",
8
"id": "string",
9
"environment": {
10
"id": "string",
11
"environmentFlag": "Staging"
12
}
13
}
14
}
15
}
  • meta
    object
    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

  • payload
    object

    Contains the payload with details about the requested source(s).

    • source
      object

      Contains a source and its related details.

      • name
        string

        Displays the human-readable name of the source.

      • id
        string

        Displays the unique identifier (i.e., client ID) of the source.

      • environment
        object

        Contains metadata about the environment.

        • id
          string

          Identifies the specific environment that you're operating in or on behalf of.

        • environmentFlag
          string

          Indicates whether the environment is used for development, staging, or production.

          Possible Values: Production, Staging, Development