Management API is a secure API that provides read and write access to your Nimvio projects. Use Nimvio Management API to manage your contents, templates, and media.
Nimvio Management API is available in REST API and GraphQL. The base URL for all request to Management API is https://api.nimvio.com/cma/rest/v1 for REST API and https://api.nimvio.com/cma/graphql/v1 for GraphQL. Requests must be made securely over HTTPS and authenticated with a valid API Key.
Authorization
Management API uses an API Key to authorize the request. Send your requests over the HTTPS and authenticate using the Authorization header.
Put the generated key to the request header, such as Authorization: <key>, to be able to access Nimvio Management APIs. Requests with an incorrect or missing header will fail with an error.
You can authenticate requests with Management API Key generated from Nimvio Settings — On the Nimvio project level, go to Settings > API > Management API > Generate the API.
API Key Expiration
When creating or regenerating Management API Keys, you can define the expiration length.
Errors
Our API follows standard HTTP status code returns to indicate the success or failure of a request. In general, status code in 2xx range indicate the successful request, status code in 4xx range indicate errors caused by incorrect input (for example, receive 401 Unauthorized error as the request provides an invalid API Key), and status code 5xx range indicate errors on our side.
HTTP Status Codes Summary
Status
Description
400 Bad Request
The request couldn't be understood by our server. It might be there are missing or invalid parameters or queries.
401 Unauthorized
The provided API key doesn't grant access to the requested resource. Please check again the API key.
403 Forbidden
The provided API key is valid, but doesn't provide permission for the specific resource.
404 Not Found
The requested resource doesn't exist. Please check the resource name for any typos.
405 Methods Not Allowed
The requested HTTP method is not supported for the specific resource.
429 Too Many Requests
The rate limit for the API has been exceeded. Try to request again after a few seconds.
5xx Internal Error or Service Unavailable
Something went wrong on our side. Try to request again after a few seconds.
REST API
You can use this base URL https://api.nimvio.com/cma/rest/v1 when working with Management API via REST API. This URL is followed by parameters or queries as below to retrieve specific served data.
Content
GET Content List
Retrieve a dynamically paginated list of contents.
https://api.nimvio.com/cma/rest/v1/contents
Put the queries in Query Parameters.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
Page
Number > 0 The page number of the content page. Example: 1
PageSize
Number > 0 The size of page. Example: 10
Sort
String The column name you want to sort. Please refer to the available keys of object from the content (such as Name, TemplateName, Status, etc.) Example: Name
SortAsc
Boolean The option to order your retrieved contents (ascending or descending). The default is to return the contents in ascending order.
QuickSearch
String Search contents based on their name.
ContentStatus
Array of String Filter list of contents based on their status (Published, Changed, or Unpublished).
TemplateName
Array of String Search contents based on their template name.
ContentAuthor
Array of String Search contents based on their author.
{ "status": 500, "message": "Oops! Something went wrong..." }
GET Content
Retrieve a single object of content.
https://api.nimvio.com/cma/rest/v1/content
Put the queries in Query Parameters.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
ItemID
String MANDATORY The ID of your specific Content without any prefix. You can get this on the Content detail sidebar Example: "f69cc50a-a134-4184-9c42-13f8e9372333"
{ "status": 500, "message": "Oops! Something went wrong..." }
POST Create Content
Add new content to your list.
https://api.nimvio.com/cma/rest/v1/createContent
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and without the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
TemplateID
String MANDATORY The ID of template used to create the content. Example: "Template_f69cc50a-a134-4184-9c42-13f8e9372333"
ContentName
String MANDATORY The name of newly created content. Example: "Template_f69cc50a-a134-4184-9c42-13f8e9372333"
ParentID
String MANDATORY The Content ID of parent of the content you want to put to. The default is Content.
{ "status": 404, "message": "Failed to read content due to content is not found on the database." }
POST Update Content
Edit or update the existing content.
https://api.nimvio.com/cma/rest/v1/updateContent
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and without the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
TemplateID
String MANDATORY The ID of template used to create the content. Example: "Template_f69cc50a-a134-4184-9c42-13f8e9372333"
ItemID
String MANDATORY The Content ID and without the prefix Content_. Example: "f3b8398d-6269-4e24-9a70-683dc38b2333"
Data
String The stringify data of your content. Example: "{\"rteTest\":\"\",\"media\":{\"Type\":\"Reference\",\"ReferenceType\":\"Media\"}}"
ContentName
String MANDATORY The name of newly created content. Example: "Template_f69cc50a-a134-4184-9c42-13f8e9372333"
ParentID
String MANDATORY The ID of parent of the content you want to put to. The default value is Content. Example: "Content_f69cc50a-a134-4184-9c42-13f8e9372333"
{ "status": 404, "message": "Failed to read content due to content is not found on the database." }
POST Delete Content
Delete the existing content.
https://api.nimvio.com/cma/rest/v1/deleteContent
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and without the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
ItemID
String MANDATORY The Content ID and without the prefix Content_. Example: "e39a4822-64a9-46c8-8077-bd6a4452c333"
{ "status": 422, "message": "Failed to delete content as this content still in use. Please refer to Used In section for the detail." }
Template
GET Template List
Retrieve a dynamically paginated list of templates.
https://api.nimvio.com/cma/rest/v1/templates
Put the queries in Query Parameters.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf333"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd333"
Page
Number > 0 The page number of the template page. Example: 1
PageSize
Number > 0 The size of page. Example: 10
Sort
String The column name you want to sort. Please refer to the available keys of object from the template (such as Name, TemplateAuthor, etc.) Example: Name
SortAsc
Boolean The option to order your retrieved contents (ascending or descending). The default is to return the contents in ascending order.
QuickSearch
String Search contents based on their name or author.
TemplateName
Array of String Search templates based on their name.
TemplateAuthor
Array of String Search templates based on their author.
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf532"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd121"
ItemID
String MANDATORY The ID of your Template without prefix Template_. Example: "21c5f80a-c9d4-4dfa-9873-a6d0071baa9d"
{ "status": 500, "message": "Oops! Something went wrong..." }
POST Create Template
Create a new template.
https://api.nimvio.com/cma/rest/v1/createTemplate
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf216"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77gs341"
TemplateName
String Put the name of your new template.
TemplateComponents
String The stringify of the template components. You can see the scheme of the template component in Formio Builder. Example: "{\"components\":[{\"label\":\"ID\",\"key\":\"id\",\"ID\":\"id\",\"isSlug\":false,\"type\":\"textfield\",\"showCharCount\":true,\"input\":true,\"tableView\":true,\"isSaved\":true}]}"
{ "status": 422, "message": "Failed to create template due to the name already exists in the table. Please try again with the valid input."
}
POST Update Template
Edit or update an existing template.
https://api.nimvio.com/cma/rest/v1/updateTemplate
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf512"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd311"
ItemID
String MANDATORY The ID of your Template without prefix Template_. Example: "21c5f80a-c9d4-4dfa-9873-a6d0071cdc9d"
TemplateName
String Put the name of your new template.
TemplateComponents
String The stringify of the template components. You can see the scheme of the template component in Formio Builder. Example: "{\"components\":[{\"label\":\"ID\",\"key\":\"id\",\"ID\":\"id\",\"isSlug\":false,\"type\":\"textfield\",\"showCharCount\":true,\"input\":true,\"tableView\":true,\"isSaved\":true}]}"
WorkflowID
String The ID of Template Workflow.
RetainValue
Boolean The flag to determine whether the updated template will reset or retain data in Content(s) that use this updated template.
{ "status": 422, "message": "Failed to update template due to the name already exists in the table. Please try again with the valid input." }
POST Delete Template
Edit or update an existing template.
https://api.nimvio.com/cma/rest/v1/deleteTemplate
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf512"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd141"
ItemID
String The ID of your Template without prefix Template_. Example: "1dc957b4-e198-4692-afcb-97bf4099d970"
{ "status": 422, "message": "Failed to delete template due to the name already exists in the table. Please try again with the valid input." }
Media
GET Media List
Retrieve a dynamically paginated list of media.
https://api.nimvio.com/cma/rest/v1/mediaList
Put the queries in Query Parameters.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf446"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77f1341"
Page
Number > 0 The page number of the template page. Example: 1
PageSize
Number > 0 The size of page. Example: 10
Sort
String The column name you want to sort. Please refer to the available keys of object from the template (such as Name, TemplateAuthor, etc.) Example: Name
SortAsc
Boolean The option to order your retrieved contents (ascending or descending). The default is to return the contents in ascending order.
Search
Object Search media based on their types and/or publishing status. Example: "Search: { Type: ["image"], Status: ["Changed"] }"
{ "status": 500, "message": "Oops! Something went wrong..." }
GET Media
Retrieve a single object data of media.
https://api.nimvio.com/cma/rest/v1/media
Put the queries in Query Parameters.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf246"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77fd241"
ItemID
String The ID of your Media without prefix Template_. Example: "5b45888a-dbf8-46d7-ba6a-bfedb82e1869"
{ "status": 404, "message": "Failed to {{ActionName}} {{EntityName}} due to not found on the database." }
POST Generate S3 URL
Generate the media URL.
https://api.nimvio.com/cma/rest/v1/generateUrl
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74df146"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77gd341"
ItemID
String The ID of your Media without prefix Media_. Example: "04811b6a-b299-4b4c-84b0-b2c298da9f66"
Media
Object An object of media consists of file name, file extension, and file size in bytes. Example: "Media": { "FileName": "media3", "Extension": "png", "Size": 594 }
{ "status": 422, "message": "The Media name media3 is already exist in this folder. Please try again with another name." }
POST Upload Media
Uploading the new media.
https://api.nimvio.com/cma/rest/v1/uploadMedia
Put the queries in the body request as JSON.
Queries
Description
TenantID
String MANDATORY The ID of your Tenant. Example: "Tenant_371c7a75-7048-47fb-8221-f887c74cf246"
EnvironmentID
String MANDATORY The Project Environment ID. You can get this ID in Project > General Setting and remove the prefix Project_. Example: "71e6b953-9076-476f-b46c-7d8ec77gd341"
ParentID
String The ID of the folder that this new media will store in. Example: "Media_1dc957b4-e198-4692-afcb-97bf4099c670"
ParentName
String The name of the folder that this new media will store in. Example: "Images Folder"
FileName
String Name of the new media. Example: "media3"
Extension
String Extension type of the new media. Example: "png"
Size
Number Size of the new media in bytes. Example: "594"
{ "data": { "deleteTemplate": null }, "errors": [ { "path": [ "deleteTemplate" ], "data": null, "errorType": "Internal server error", "errorInfo": { "errorCode": 404, "additional": "Template with PK: Project_d1e92fec-55b8-49b5-8440-a2fc27113d57 and SK: Template_44eb4cbe-138c-467d-8d6e-05aef31bb68c is not found on NimvioTableV2-develop table.", "component": "alert", "invocationType": "Synchronous" }, "locations": [ { "line": 3, "column": 3, "sourceName": null } ], "message": "Failed to delete template due to template is not found on the database." } ], "status": 200, "headers": {} }
Media
POST Media List
Retrieve a dynamically paginated list of media.
Query
Variables
query MediaList( $ProjectID: String! $TenantID: String! $Page: Int $PageSize: Int $Search: MediaSearch $Sort: String $SortAsc: Boolean ) { media( ProjectID: $ProjectID TenantID: $TenantID Search: $Search Page: $Page PageSize: $PageSize Sort: $Sort SortAsc: $SortAsc ) { data { ... on Media { Name PublishedAt UpdatedBy UpdatedAt MediaID Status Data { Type ParentName Extension Size S3URL } Acl { Administer Create Delete Edit Read } } } message status error { ErrorType Message } } }
{ "data": { "media": null }, "errors": [ { "path": [ "media" ], "data": null, "errorType": "Not found", "errorInfo": { "errorCode": 400, "additional": "Failed to {{ActionName}} {{EntityName}} due to not found on the database.", "component": "alert", "invocationType": "Synchronous" }, "locations": [ { "line": 9, "column": 3, "sourceName": null } ], "message": "Failed to {{ActionName}} {{EntityName}} due to not found on the database." } ], "status": 200, "headers": {} }
POST Generate S3 URL
Generate the media URL.
Query
Variables
mutation GenerateUrl( $EnvironmentID: String! $TenantID: String! $Media: MediaInput $MediaID: String ) { generateUrl( EnvironmentID: $EnvironmentID TenantID: $TenantID Media: $Media MediaID: $MediaID ) { status error { ErrorType Message } data { ... on Media { ProjectID MediaID Data { S3URL } } } } }