Change where an agent you connected works
PATCH
/api/v1/keys/{id}
const url = 'http://localhost:3000/api/v1/keys/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"projects":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"scope":"propose"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/keys/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "projects": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "scope": "propose" }'Its projects and its scope, as the consent screen gives them: the scope is brought down, in each project, to the most you may give there. It keeps its secret, so the agent doesn’t sign in again. Only your own agents.
Scope: read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Key id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
projects
required
Array<string>
scope
required
string
Responses
Section titled “Responses”The agent, as it is now
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
projects
required
Where it works, the first where a call without project goes
Array<object>
object
id
required
string format: uuid
name
required
string
organization
required
string
scope
required
string
givable
required
Every project you could give it, with the most you may give there
Array<object>
object
id
required
string format: uuid
name
required
string
organization
required
string
max
required
string
Example
{ "data": { "projects": [ { "scope": "read" } ], "givable": [ { "max": "propose" } ] }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}