Skip to main content

Import Project From Manifest (Via API)


Create your authorization token

info

To use this guide, you'll need your access-token.
For help generating a token, refer to this guide.

Upload Manifest File

info

For a full list of system compatible manifest files please refer to this guide.

Upload the manifest file to the system. The parameters for this case are:

ParameterTypeExplanationRequired
instance-idstringThis parameter will be given by illustria team.Yes
auth-tokenstringUse the parameter from previous step.Yes
path-to-manifest-filestringThe location of your manifest file.Yes
Example Code
curl --request POST \
--url https://<instance-id>.illustria.io/artifacts/upload \
--header 'Authorization: Bearer <auth-token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@<path-to-manifest-file>
info

The response of this request is the artifact-id.
Make sure you keep it as this is the identifier of your file in the system.

Import Your Project

Upload the manifest file to the system. The parameters for this case are:

ParameterTypeExplanationRequiredDefault value
instance-idstringThis parameter will be given by illustria team.Yes-
auth-tokenstringUse the parameter from previous step.Yes-
project-namestringUnique identifier or title for your project.Noproject-id - Sets the project name as its id.
project-descriptionstringDetailed summary of the project's objectives and scope.Noempty-string
package-managerstringWhich package manger is used to install/uninstall software packages.Yes-
artifact-idstringId generated from uploading a manifest.Yes-
project-versionstringSpecific release or iteration of the project.NoCUSTOM

Once you have the artifact-id you can import your project:

  • Use The GraphQL query:
 curl --request POST \
--url https://<instance-id>.illustria.io/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth-token>' \
--data '
{
"query": "mutation ImportProject($applicationName: String!, $description: String!, $artifactType: String!, $mainArtifactId: String!, $projectVersion: String) { importProjectFromManifest(applicationName: $applicationName, description: $description, packageManager: $artifactType, mainArtifactId: $mainArtifactId, projectVersion: $projectVersion) { __typename ... on GQLTask { id_ }}}",
"variables": {
"applicationName": "<project-name>",
"description": "<project-description>",
"artifactType": "<package-manager>",
"mainArtifactId": "<artifact-id>",
"projectVersion": "<project-version>"
}
}
'
info

The response of this request is the task-id which allows you to follow the import process.

Check import status and fetch project data

ParameterTypeExplanationRequiredDefault value
instance-idstringThis parameter will be given by illustria team.Yes-
auth-tokenstringUse the parameter from previous step.Yes-
task-idstringUnique identifier for a specific task.Noempty-array - Shows all running tasks.

You can follow the status of your project's import process using the following API:

 curl --request POST \
--url https://<instance-id>.illustria.io/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth-token>' \
--data '{
"query": "query Search($filters: GQLFilterParams) { search(searchType: TASK, filters: $filters) { __typename ... on GQLSearchResults { totalRecordsCount filteredRecordsCount records { __typename ... on GQLTask { status } } } } }",
"variables": {
"filters": {
"recordIds": ["<task-id>"]
}
}
}'

Once completed, you can get your projects data using the following API:

 curl --request POST \
--url https://<instance-id>.illustria.io/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth-token>' \
--data '
{
"query": "query Search($filters: GQLFilterParams) { search(searchType: APPLICATION, filters: $filters) { __typename ... on GQLSearchResults { totalRecordsCount missingRecordsCount filteredRecordsCount records { __typename ... on GQLApplication { id_ packagesCount versionName versionType applicationIndex { __typename ... on GQLApplicationIndex { id_ displayName } } } } } } }",
"variables": {
"filters": {

}
}
}
'