5. Working with Agents

create_agent schema

I want to digress here. When the API docs are thin (say after a new ArchivesSpace release) you’ll really benefit from experimenting.

Debugging the API docs

Read what’s there and guess at the next step.

    curl -H "X-ArchivesSpace-Session: $SESSION" \
        http://localhost:8089/agents/people

I get back an error

    {
        "error":{
            "page":[
                "Parameter required but no value provided"
            ],
            "id_set":[
                "Parameter required but no value provided"
            ],
            "all_ids":[
                "Parameter required but no value provided"
            ]
        }
    }

And it lets us know the options expected. We will use “all_ids=true” next.