Public
Documentation Settings

open-data-bim-public

AUTHORIZATIONAPI Key
Key

Authorization

Value

9zsowo7$Aag6jiNtTp-b2

ODB

AUTHORIZATIONAPI Key
This folder is using API Key from collectionopen-data-bim-public

/run-task (s3 case)

S3 Case

1. Create an S3 Bucket

bash
aws s3api create-bucket \
    --bucket <bucket name> \
    --region eu-north-1 \
    --create-bucket-configuration LocationConstraint=eu-north-1

2. Create a Bucket Policy File

bash
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::894252403637:user/test-task-user"
            },
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:PutObjectAcl",
                "s3:RestoreObject",
                "s3:GetObjectAttributes",
                "s3:GetObjectVersionAttributes",
                "s3:GetObjectVersion",
                "s3:ListBucketVersions",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::<bucket name>/*",
                "arn:aws:s3:::<bucket name>"
            ]
        }
    ]
}

3. Put a Bucket Policy on S3 Bucket

bash
aws s3api put-bucket-policy \
    --bucket <bucket name> 
    --policy file://policy.json

4. Upload file to S3 Bucket

bash
aws s3 cp \
    "/path/to/file/example.ifc" \ 
    s3://<bucket name>/

5. Use API for create convert task

bash
curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task' \
--header 'Content-Type: application/json' \
--header &#x27;Authorization: Bearer <auth token>&#x27; \
--data '{
 "bucket": "<bucket name>",
 "client_task_id": "test_593"
}'

6. Check status using task_id from response from previous step

bash
curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/task-info?task_id=6eb16c56-2719-40bf-8453-1b4e424f7cb1' \
--header &#x27;Authorization: Bearer <auth token>&#x27;
AUTHORIZATIONAPI Key
This folder is using API Key from collectionopen-data-bim-public

POSTrunTask S3

https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task
AUTHORIZATIONAPI Key
This request is using API Key from collectionopen-data-bim-public
HEADERS
Content-Type

application/json

Bodyraw (json)
json
{
 "bucket": "test-stockholm-oped-data-bim",
 "client_task_id": "test_5"
}
Example Request
curl
curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task' \
--header 'Content-Type: application/json' \
--data '{
 "bucket": "test-stockholm-oped-data-bim",
 "client_task_id": "test_5"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers