MoJ Online Form Builder Metadata API Docs (1.0.0)

Download OpenAPI specification:Download

Introduction

This is the Form Builder Metadata API documentation.

The application is responsible for storing and serving metadata versions for all the services created by the MoJ Online Form Builder tool.

The code repository can be found here.

In order to interact with the API each request must have a JWT bearer token in the Authorizaion header signed by a private key.

Services

Create a Service

Creates a brand new service

Authorizations:
jwt
Request Body schema: application/json
required
object (service)

Service schema definition

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "service_id": "634aa3d5-a3b3-4d0f-9078-bb754542a1d3",
  • "service_name": "Service Name",
  • "version_id": "ac4b45c5-071e-4d07-b5a2-9f0196a5b267",
  • "created_at": "2020-10-09T11:51:46",
  • "created_by": "4634ec01-5618-45ec-a4e2-bb5aa587e751",
  • "configuration": {
    },
  • "pages": [
    ],
  • "locale": "en"
}

Create a new Service metadata version

Updates metadata for a given Service ID with a new version

Authorizations:
jwt
path Parameters
service_id
required
string

The Service ID that needs to be updated

query Parameters
locale
string

Optional. The locale of the metadata. Defaults to "en". Could be "cy"

Request Body schema: application/json
required
object (service)

Service schema definition

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "service_id": "634aa3d5-a3b3-4d0f-9078-bb754542a1d3",
  • "service_name": "Service Name",
  • "version_id": "ac4b45c5-071e-4d07-b5a2-9f0196a5b267",
  • "created_at": "2020-10-09T11:51:46",
  • "created_by": "4634ec01-5618-45ec-a4e2-bb5aa587e751",
  • "configuration": {
    },
  • "global": [
    ],
  • "modules": {
    },
  • "meta": {
    },
  • "standalone": [
    ],
  • "pages": [
    ],
  • "locale": "en",
  • "locales": [
    ]
}

Get Service versions

Gets all the versions for a Service ID

Authorizations:
jwt
path Parameters
service_id
required
string

The Service ID that needs to be updated

query Parameters
locale
string

Optional. The locale of the metadata. Defaults to "en". Could be "cy"

Responses

Response samples

Content type
application/json
{
  • "service_name": "Service Name",
  • "service_id": "634aa3d5-a3b3-4d0f-9078-bb754542a1d3",
  • "versions": [
    ]
}

Get latest Service metadata

Gets the latest metadata for a given Service ID

Authorizations:
jwt
path Parameters
service_id
required
string

The Service ID that needs to be updated

query Parameters
locale
string

Optional. The locale of the metadata. Defaults to "en". Could be "cy"

Responses

Response samples

Content type
application/json
{
  • "service_id": "634aa3d5-a3b3-4d0f-9078-bb754542a1d3",
  • "service_name": "Service Name",
  • "version_id": "ac4b45c5-071e-4d07-b5a2-9f0196a5b267",
  • "created_at": "2020-10-09T11:51:46",
  • "created_by": "4634ec01-5618-45ec-a4e2-bb5aa587e751",
  • "configuration": {
    },
  • "global": [
    ],
  • "modules": {
    },
  • "meta": {
    },
  • "standalone": [
    ],
  • "pages": [
    ],
  • "locale": "en",
  • "locales": [
    ]
}

Get specific version of a Service

Gets a specific version for version ID from a Service ID

Authorizations:
jwt
path Parameters
service_id
required
string

The Service ID

version_id
required
string

The Version ID

Responses

Response samples

Content type
application/json
{
  • "service_id": "634aa3d5-a3b3-4d0f-9078-bb754542a1d3",
  • "service_name": "Service Name",
  • "version_id": "ac4b45c5-071e-4d07-b5a2-9f0196a5b267",
  • "created_at": "2020-10-09T11:51:46",
  • "created_by": "4634ec01-5618-45ec-a4e2-bb5aa587e751",
  • "configuration": {
    },
  • "global": [
    ],
  • "modules": {
    },
  • "meta": {
    },
  • "standalone": [
    ],
  • "pages": [
    ],
  • "locale": "en",
  • "locales": [
    ]
}

Get Services for user

Gets the Services for a given user ID

Authorizations:
jwt
path Parameters
user_id
required
string

The User ID

Responses

Response samples

Content type
application/json
{
  • "services": [
    ]
}