Buckets API

Buckets API is used to manage buckets under an Agenty account. Use this api to create new bucket, upload documents to a bucket, delete the bucket etc.

Create a bucket

Endpoint:

Method: POST
URL: https://api.agenty.com/v1/buckets

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

{
    "name": "5000 images to OCR",
    "region": "us-east-1",
    "description": "5000 images to OCR for ediscovery customer tonight"
}

Responses:

Status: OK | Code: 200

{
    "status_code": 200,
    "message": "A new bucket with id: 34 created successfully"
}

Get bucket by id

Endpoint:

Method: GET
URL: https://api.agenty.com/v1/buckets/{{BUCKET_ID}}

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: OK | Code: 200

{
    "bucket_id": 33,
    "name": "My documents to OCR",
    "description": "5000 images to OCR for ediscovery customer tonight",
    "region": "us-east-1",
    "total_documents": null,
    "total_size": null,
    "created_at": "2019-03-08T08:23:32",
    "updated_at": null,
    "refreshed_at": null
}

Update bucket by id

Endpoint:

Method: PUT
URL: https://api.agenty.com/v1/buckets/{{BUCKET_ID}}

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

{
    "bucket_id": 33,
    "name": "5000 Documents to OCR",
    "description": "5000 images to OCR for ediscovery customer tonight",
    "region": "us-east-1"
}

Responses:

Status: OK | Code: 200

{
    "status_code": 200,
    "message": "Bucket with id: 33 updated successfully"
}

Get all buckets

Endpoint:

Method: GET
URL: https://api.agenty.com/v1/buckets

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: OK | Code: 200

{
    "total": 2,
    "limit": 1000,
    "offset": 0,
    "returned": 2,
    "result": [
        {
            "bucket_id": 33,
            "name": "My documents to OCR",
            "description": "5000 images to OCR for ediscovery customer tonight",
            "region": "us-east-1",
            "total_documents": null,
            "total_size": null,
            "created_at": "2019-03-08T08:23:32",
            "updated_at": null,
            "refreshed_at": null
        },
        {
            "bucket_id": 34,
            "name": "5000 images to OCR",
            "description": "5000 images to OCR for ediscovery customer tonight",
            "region": "us-east-1",
            "total_documents": null,
            "total_size": null,
            "created_at": "2019-03-08T08:24:57",
            "updated_at": null,
            "refreshed_at": null
        }
    ]
}

Delete bucket by id

Endpoint:

Method: DELETE
URL: https://api.agenty.com/v1/buckets/{{BUCKET_ID}}

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: OK | Code: 200

{
    "status_code": 200,
    "message": "Bucket with id: 33 deleted successfully"
}