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?
How is you call structured in the agent, can you show the configuration?
Yes this is the schema-
openapi: 3.1.0
info:
title: Custom Atlassian API
version: 1.0.0
servers:
- url: https://name.atlassian.net
description: Custom Atlassian server
paths:
/wiki/api/v2/spaces:
get:
operationId: getSpacesId
summary: Retrieve space information
description: Get the ID of a space filtered by keys.
parameters:
- in: query
name: keys
required: true
description: Keys to filter spaces by.
schema:
type: string
security:
- basicAuth: []
responses:
'200':
description: The space ID.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The ID of the space.
/wiki/api/v2/pages:
post:
operationId: createPage
summary: Create a new page
description: Create a new page in a specified space.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
spaceId:
type: string
description: The ID of the space.
status:
type: string
enum: [current]
description: The status of the page.
title:
type: string
description: The title of the page.
body:
type: object
properties:
representation:
type: string
enum: [storage]
description: The format of the body.
value:
type: string
description: The content of the page.
security:
- basicAuth: []
responses:
'201':
description: The page was created successfully.
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.