Hi I am using the following two apis-
Get https://name.atlassian.net/wiki/api/v2/spaces?fields=name
Post
https://name.atlassian.net/wiki/api/v2/pages
Now, in the postman if I am authenticating using the emailid:token type of basic auth it runs perfectly,
but if I have to use it in an agent with a schema then I am passing it as
Basic <base64 encoded format> but it shows 401 how to resolve?
Hi @Mansi Gusain
How is you call structured in the agent, can you show the configuration?
Yes this is the schema-
openapi: 3.1.0info:title: Custom Atlassian APIversion: 1.0.0servers:- url: https://name.atlassian.netdescription: Custom Atlassian serverpaths:/wiki/api/v2/spaces:get:operationId: getSpacesIdsummary: Retrieve space informationdescription: Get the ID of a space filtered by keys.parameters:- in: queryname: keysrequired: truedescription: Keys to filter spaces by.schema:type: stringsecurity:- basicAuth: []responses:'200':description: The space ID.content:application/json:schema:type: objectproperties:id:type: stringdescription: The ID of the space./wiki/api/v2/pages:post:operationId: createPagesummary: Create a new pagedescription: Create a new page in a specified space.requestBody:required: truecontent:application/json:schema:type: objectproperties:spaceId:type: stringdescription: The ID of the space.status:type: stringenum: [current]description: The status of the page.title:type: stringdescription: The title of the page.body:type: objectproperties:representation:type: stringenum: [storage]description: The format of the body.value:type: stringdescription: The content of the page.security:- basicAuth: []responses:'201':description: The page was created successfully.components:securitySchemes:basicAuth:type: httpscheme: basic
No what is the configuration of you API you want to make.
The above provide info is just the default.
A simple example can be found in the documentation, https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
https://name.atlassian.net/wiki/v2/pages
https://name.atlassian.net/wiki/v2/spaces
It looks like you're new here. Sign in or register to get started.